diff options
author | Brad King <brad.king@kitware.com> | 2022-02-04 20:33:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-02-04 20:33:11 (GMT) |
commit | a9b8c9d33e222e1785a9878084e6b2244c152746 (patch) | |
tree | 533aa778307483da3d5ce8e072d3c0ae2f606658 /Help/variable/CMAKE_INSTALL_PREFIX.rst | |
parent | 5c9bf43a1f476af762e83a8ba18b6ad806a3001a (diff) | |
download | CMake-a9b8c9d33e222e1785a9878084e6b2244c152746.zip CMake-a9b8c9d33e222e1785a9878084e6b2244c152746.tar.gz CMake-a9b8c9d33e222e1785a9878084e6b2244c152746.tar.bz2 |
Help: Clarify roles of DESTDIR and CMAKE_INSTALL_PREFIX
Diffstat (limited to 'Help/variable/CMAKE_INSTALL_PREFIX.rst')
-rw-r--r-- | Help/variable/CMAKE_INSTALL_PREFIX.rst | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Help/variable/CMAKE_INSTALL_PREFIX.rst b/Help/variable/CMAKE_INSTALL_PREFIX.rst index 02ba645..b92d3ef 100644 --- a/Help/variable/CMAKE_INSTALL_PREFIX.rst +++ b/Help/variable/CMAKE_INSTALL_PREFIX.rst @@ -10,7 +10,8 @@ See :variable:`CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT` for how a project might choose its own default. On UNIX one can use the ``DESTDIR`` mechanism in order to relocate the -whole installation. See :envvar:`DESTDIR` for more information. +whole installation to a staging area. See the :envvar:`DESTDIR` environment +variable for more information. The installation prefix is also added to :variable:`CMAKE_SYSTEM_PREFIX_PATH` so that :command:`find_package`, :command:`find_program`, @@ -21,3 +22,12 @@ will search the prefix for other software. Use the :module:`GNUInstallDirs` module to provide GNU-style options for the layout of directories within the installation. + +The ``CMAKE_INSTALL_PREFIX`` may be defined when configuring a build tree +to set its installation prefix. Or, when using the :manual:`cmake(1)` +command-line tool's ``--install`` mode, one may specify a different prefix +using the ``--prefix`` option: + +.. code-block:: shell + + cmake --install . --prefix /my/install/prefix |