summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2018-04-17 18:21:32 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2018-04-20 12:39:52 (GMT)
commita4f71b4ba8204c7e4a70057af131170165605288 (patch)
tree280c152a8f6edf7d5652c77949bba2f9f366602b
parentfcf64866dad8ce239382df5d6fde01f90ccc7e63 (diff)
downloadCMake-a4f71b4ba8204c7e4a70057af131170165605288.zip
CMake-a4f71b4ba8204c7e4a70057af131170165605288.tar.gz
CMake-a4f71b4ba8204c7e4a70057af131170165605288.tar.bz2
Help: Document existence of cmake_install.cmake
This file, which is currently undocumented, is useful for external packaging programs that wish to install only a single component at a time. This change adds documentation for the file.
-rw-r--r--Help/command/install.rst23
-rw-r--r--Help/release/dev/cmake-install-doc.rst7
2 files changed, 30 insertions, 0 deletions
diff --git a/Help/command/install.rst b/Help/command/install.rst
index e9c185c..d3818d6 100644
--- a/Help/command/install.rst
+++ b/Help/command/install.rst
@@ -400,3 +400,26 @@ executable from the installation tree using the imported target name
those generated by :command:`install_targets`,
:command:`install_files`, and :command:`install_programs` commands
is not defined.
+
+Generated Installation Script
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The ``install()`` command generates a file, ``cmake_install.cmake``, inside
+the build directory, which is used internally by the generated install target
+and by CPack. You can also invoke this script manually with ``cmake -P``. This
+script accepts several variables:
+
+``COMPONENT``
+ Set this variable to install only a single CPack component as opposed to all
+ of them. For example, if you only want to install the ``Development``
+ component, run ``cmake -DCOMPONENT=Development -P cmake_install.cmake``.
+
+``BUILD_TYPE``
+ Set this variable to change the build type if you are using a multi-config
+ generator. For example, to install with the ``Debug`` configuration, run
+ ``cmake -DBUILD_TYPE=Debug -P cmake_install.cmake``.
+
+``DESTDIR``
+ This is an environment variable rather than a CMake variable. It allows you
+ to change the installation prefix on UNIX systems. See :envvar:`DESTDIR` for
+ details.
diff --git a/Help/release/dev/cmake-install-doc.rst b/Help/release/dev/cmake-install-doc.rst
new file mode 100644
index 0000000..028aa43
--- /dev/null
+++ b/Help/release/dev/cmake-install-doc.rst
@@ -0,0 +1,7 @@
+cmake-install-doc
+-----------------
+
+* The existence and functionality of the file
+ ``${CMAKE_BINARY_DIR}/cmake_install.cmake`` has now been documented in the
+ :command:`install` documentation so that external packaging software can take
+ advantage of CPack-style component installs.