[CMake] issue with INSTALL and CMAKE_INSTALL_PREFIX
William A. Hoffman
billlist at nycap.rr.com
Thu Oct 5 08:37:38 EDT 2006
At 05:39 AM 10/5/2006, Xavier Delannoy wrote:
>it's working fine. I have moved
>SET(CMAKE_INSTALL_PREFIX "$ENV{DESTDIRPREFIX}")
>to the root CMakeLists.txt
>
>(<lib_dir>- CMakelists.txt
> |--static
> |-- CMakeLists.txt
> |--shared
> |-- CMakeLists.txt
>
>if SET(CMAKE_INSTALL_PREFIX "$ENV{DESTDIRPREFIX}") is in the shared/CMakelists.txt the installation process failed (the CMAKE_INSTALL_PREFIX is ignored).
>whereas if SET(CMAKE_INSTALL_PREFIX "$ENV{DESTDIRPREFIX}") is in the <lib_dir>/CMakeLists.txt it's OK.
CMAKE_INSTALL_PREFIX is a CACHE variable, so you have to set it from the cache.
However, are you sure you don't want to use DESTDIR which cmake does support.
http://www.cmake.org/Wiki/index.php?title=CMake_FAQ&printable=yes#Does_CMake.27s_.22make_install.22_support_DESTDIR.3F
make install DESTDIR=/path/to/foo
-Bill
More information about the CMake
mailing list