>>> On 23-11-2010 at 15:37, in message <1290523061.2001.8.ca...@gildemeister-2>, Micha Renner <[email protected]> wrote: > Am Dienstag, den 23.11.2010, 15:01 +0100 schrieb Michael Wild: >> On 11/23/2010 02:33 PM, Micha Renner wrote: >> > Am Dienstag, den 23.11.2010, 14:01 +0100 schrieb [email protected]: >> >> Dear Cmake users, >> >> >> >> 1) I am trying to set CMAKE_INSTALL_PREFIX in the CMakeLists file with >> >> SET(CMAKE_INSTALL_PREFIX, "my/path") >> > ^ >> > No comma! >> > >> > greetings >> > Micha >> >> 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. > > Okay, then this might help: > > IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) > SET(CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "Foo install > prefix" FORCE) > ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) > > Of course, this is not my idea. It had someone from kitware, I don't > remember who it was. > > > greetings > Micha
Hi Micha, I would prefer to use SET(CMAKE_INSTALL_PREFIX "/foo/bar" CACHE PATH "Foo install prefix") So, without the test to CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT, and without the FORCE option. Reason: if someone unsets CMAKE_INSTALL_PREFIX on the command-line with -U, CMAKE_INSTALL_PREFIX will default to /foo/bar (which is the project's default), instead of /usr/local (which is CMake's default). Just my 2cts. Marcel Loose. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
