On Tue, Sep 15, 2009 at 02:08:44PM -0600, James C. Sutherland wrote:
> So assuming that I wanted my CMakeLists.txt file to modify the default
> install location, but allow the user to change this, wouldn't I do
> something like:
> >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.
This will work when generating a new cache. If you have a pre-existing
cache, CMake won't override the value in there (otherwise how could a
user ever provide her own values for cache variables).
You can use FORCE to overcome this, but it usually isn't what you want.
tyler
_______________________________________________
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