4 .. include:: ENV_VAR.txt
6 On UNIX one can use the ``DESTDIR`` mechanism in order to relocate the
7 whole installation. ``DESTDIR`` means DESTination DIRectory. It is
8 commonly used by packagers to install software in a staging directory.
14 make DESTDIR=/package/stage install
16 will install the software using the installation prefix, e.g. ``/usr/local``,
17 prepended with the ``DESTDIR`` value which gives ``/package/stage/usr/local``.
18 The packaging tool may then construct the package from the content of the
19 ``/package/stage`` directory.
21 See the :variable:`CMAKE_INSTALL_PREFIX` variable to control the
22 installation prefix when configuring a build tree. Or, when using
23 the :manual:`cmake(1)` command-line tool's :option:`--install <cmake --install>`
24 mode, one may specify a different prefix using the
25 :option:`--prefix <cmake--install --prefix>` option.
29 ``DESTDIR`` may not be used on Windows because installation
30 prefix usually contains a drive letter like in ``C:/Program Files``
31 which cannot be prepended with some other prefix.