OS: Ubuntu 18.04, Ubuntu 20.04
Download stow
from apt
.
Replace xxx
with the 3rd library you want to name.
git clone https://github.com/XXX/xxx.git
cd ./xxx/
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/stow/XXX -G Ninja ..
cmake --build . --config Release && sudo cmake --install .
cd /usr/local/stow
sudo stow xxx
cd /usr/local/stow
sudo stow -D xxx
For me, I like to explicitly specify the version of the library. So I name the target directory xxx-{version}.