[CMake] set CMAKE_INSTALL_PREFIX in CMakeLists

Tyler Roscoe tyler at cryptio.net
Wed Nov 24 11:45:07 EST 2010


On Wed, Nov 24, 2010 at 12:11:56PM +0100, Micha Renner wrote:
> 
> >   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.
>
> No, as I mentioned, there was an article of one the CMake-maintainers
> who recommended this.

Micha is correct. CMAKE_INSTALL_PREFIX is set before your CMakeLists.txt
is processed, so the above will never do anything.

tyler


More information about the CMake mailing list