2013-10-15 19:17:36 +04:00
|
|
|
CPACK_SET_DESTDIR
|
|
|
|
-----------------
|
|
|
|
|
2015-08-18 08:34:01 +03:00
|
|
|
Boolean toggle to make CPack use ``DESTDIR`` mechanism when packaging.
|
2013-10-15 19:17:36 +04:00
|
|
|
|
2015-08-18 08:34:01 +03:00
|
|
|
``DESTDIR`` means DESTination DIRectory. It is commonly used by makefile
|
2013-10-15 19:17:36 +04:00
|
|
|
users in order to install software at non-default location. It is a
|
|
|
|
basic relocation mechanism that should not be used on Windows (see
|
2015-08-18 08:34:01 +03:00
|
|
|
:variable:`CMAKE_INSTALL_PREFIX` documentation). It is usually invoked like
|
|
|
|
this:
|
2013-10-15 19:17:36 +04:00
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
make DESTDIR=/home/john install
|
|
|
|
|
|
|
|
which will install the concerned software using the installation
|
2015-08-18 08:34:01 +03:00
|
|
|
prefix, e.g. ``/usr/local`` prepended with the ``DESTDIR`` value which
|
|
|
|
finally gives ``/home/john/usr/local``. When preparing a package, CPack
|
2013-10-15 19:17:36 +04:00
|
|
|
first installs the items to be packaged in a local (to the build tree)
|
2015-08-18 08:34:01 +03:00
|
|
|
directory by using the same ``DESTDIR`` mechanism. Nevertheless, if
|
|
|
|
``CPACK_SET_DESTDIR`` is set then CPack will set ``DESTDIR`` before doing the
|
2013-10-15 19:17:36 +04:00
|
|
|
local install. The most noticeable difference is that without
|
2015-08-18 08:34:01 +03:00
|
|
|
``CPACK_SET_DESTDIR``, CPack uses :variable:`CPACK_PACKAGING_INSTALL_PREFIX`
|
|
|
|
as a prefix whereas with ``CPACK_SET_DESTDIR`` set, CPack will use
|
|
|
|
:variable:`CMAKE_INSTALL_PREFIX` as a prefix.
|
2013-10-15 19:17:36 +04:00
|
|
|
|
2015-08-18 08:34:01 +03:00
|
|
|
Manually setting ``CPACK_SET_DESTDIR`` may help (or simply be necessary)
|
|
|
|
if some install rules uses absolute ``DESTINATION`` (see CMake
|
|
|
|
:command:`install` command). However, starting with CPack/CMake 2.8.3 RPM
|
|
|
|
and DEB installers tries to handle ``DESTDIR`` automatically so that it is
|
|
|
|
seldom necessary for the user to set it.
|