Install cmake to the specified directory

By default, we are getting the source code of a library (including CmakeLists.txt) and $REPO/buildexecuting it in it:

cmake ..
make install

, the cmakelibrary will be installed on /usr/local/includeand /usr/local/libon . This is known as a "partial installation".

If you want to install globally, you need to execute:

cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. 
make all install

will install the library on /usr/includeand /usr/lib.

Guess you like

Origin blog.csdn.net/weixin_43466027/article/details/123866092