[CMake] set CMAKE_INSTALL_PREFIX in CMakeLists

Diablo 666 thediablo666 at hotmail.de
Fri Nov 26 08:26:11 EST 2010


> And *NEVER EVER* set CMAKE_INSTALL_PREFIX in your CMakeLists.txt file.
> That is a user-setting and you will make people angry at you if you
> override their choice in your code.

There is actually one single use-case where it might be useful to change this variable once:
Say you have a library libFoo installed in /path/to/libfoo. Now you like to have an add-on library.
You might want to normally install this library to the same location where the base library is.
The CMake file here can set the CMAKE_INSTALL_PREFIX to /path/to/libfoo _once_.


(I actually hope that there will never be a real libFoo in the world... I like to use the name in my mails)
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101126/071170db/attachment.htm>


More information about the CMake mailing list