I want to generate Makefile with install target, making installation to /usr instead of default /usr/local. Assuming that build directory is done in the source subdirectory, I execute:
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ..
Now I execute:
make make install
All files are still installed to usr/local. What is wrong?
There is no CMAKE_INSTALL_PREFIX in any of CMakeLists.txt project files.
Before running cmake, I delete everything from the output directory.
install directives in CMakeLists.txt look like:
install(TARGETS mylibrary DESTINATION lib)