> Looks like the default for CMAKE_INSTALL_PREFIX comes from
> CMakeGenericSystem.cmake:
>
>
> # Set a variable to indicate whether the value of CMAKE_INSTALL_PREFIX
> # was initialized by the block below.  This is useful for user
> # projects to change the default prefix while still allowing the
> # command line to override it.
> IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
>  SET(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 1)
> ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
>
> IF(CMAKE_HOST_UNIX)
>  SET(CMAKE_INSTALL_PREFIX "/usr/local"
>    CACHE PATH "Install path prefix, prepended onto install directories.")
> ELSE(CMAKE_HOST_UNIX)
> [...]
>
>
> The comment above the first stanza is interesting. I guess its intended
> use is for something like this:
>
> if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
>    set (CMAKE_INSTALL_PREFIX "myPrefix" CACHE FORCE ...)
> endif ()
>
>
> Maybe a more seasoned CMaker can verify if this is the Right Way to do
> what you want.
>

I am going to have to bookmark this reply since I have no time to play
with my CMakeLists files now. That would be a much better solution
than me always forcing a value like the way I posted in this thread.

Thank You.
John
_______________________________________________
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

Reply via email to