|
|
@@ -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.
|