[CMake] DESTDIR, CMAKE_INSTALL_PREFIX, rpath, dynamic libs
Alexander Neundorf
a.neundorf-work at gmx.net
Fri Apr 24 16:19:41 EDT 2009
On Friday 24 April 2009, Darren Weber wrote:
> In the cmake FAQ, it indicates that cmake will use the DESTDIR on the
> command line as the root of the install path.
> http://www.vtk.org/Wiki/CMake_FAQ (item 8.1, as of April 2009)
>
> What is the level of precedence for this variable setting, with regard to
> cache values that are set at the time of cmake configuration (using
> -D<var>:<type>=<val>)? That is, if cmake is called with something like
> -DCMAKE_INSTALL_PREFIX:PATH=${prefix}, will 'gmake install
> DESTDIR=${anotherPrefix}' use the cache variable setting for ${prefix} or
> will it use the command line setting for ${anotherPrefix} when setting
> rpath in dynamic libs.
>
> Furthermore, what is the relationship between these variable settings for
> the install path and, on OSX, the setting for CMAKE_INSTALL_NAME_DIR? Does
> this variable interact in any way with the DESTDIR command line setting
> (for dynamic library builds)?
The DESTDIR env.variable is a purely install-time thing, i.e. it doesn't
affect CMAKE_INSTALL_PREFIX or RPATH or install_name_dir.
E.g. if you set CMAKE_INSTALL_PREFIX to /home/alex/install, and then before do
install like this:
$ DESTDIR=/tmp/blub/ make install
then everything will be installed into /tmp/blub/home/alex/install
Alex
More information about the CMake
mailing list