After you compiled and built your code, you should install it by calling sudo install to put headers and shared libraries into /usr/include/ and /usr/lib/ and configuration files into /usr/local and /usr/share
usually, I don’t like to touch my system binaries and I prefer to install my compiled code into my home directory so I can safely delete them anytime. If you using CMake use the following parameters to install everything in “/home/<user_name>/usr” instead of “/usr”
1 |
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=~/usr .. && make -j8 all install |
if you are just using make, use the following:
1 |
make install DESTDIR=/home/<user_name>/usr |
[…] my other tutorial, I showed you how to install your code in an arbitrary location in Unix/ Linux systems. In this […]