On Sep 15, 2009, at 2:47 PM, Tyler Roscoe wrote:

On Tue, Sep 15, 2009 at 02:20:35PM -0600, James C. Sutherland wrote:
set( CMAKE_INSTALL_PREFIX
${CMAKE_CURRENT_BINARY_DIR}
CACHE PATH "installation path"
)
This doesn't work - I assume that this is because
CMAKE_INSTALL_PREFIX
is a special (internally defined) variable?  When I run ccmake and
configure, the value remains as /usr/local.

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 ()


if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
  set (CMAKE_INSTALL_PREFIX
    ${CMAKE_CURRENT_BINARY_DIR}
    CACHE PATH "" FORCE
    )
endif()

This did what I want. It sets the default value for what I want, and allows the user to reset it when running ccmake.

Thanks for the tips!

James
_______________________________________________
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