summaryrefslogtreecommitdiffstats
path: root/Help/command
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-06-19 15:50:39 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-06-19 15:50:51 (GMT)
commit00a9d133fb2838ebb756d684659c5d51f577ede3 (patch)
tree9935bd2cff743a49d1c5def1a36f227e45a7d04c /Help/command
parentc3fbe69a34ef908dd57c0b6db99fe41c0c66d26a (diff)
parente89ad0f94e6b52cc9f75abe21107c7a2e5d24ca2 (diff)
downloadCMake-00a9d133fb2838ebb756d684659c5d51f577ede3.zip
CMake-00a9d133fb2838ebb756d684659c5d51f577ede3.tar.gz
CMake-00a9d133fb2838ebb756d684659c5d51f577ede3.tar.bz2
Merge topic 'install_from_another_directory'
e89ad0f94e install: Allow installing targets created in another directory Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2152
Diffstat (limited to 'Help/command')
-rw-r--r--Help/command/install.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Help/command/install.rst b/Help/command/install.rst
index 08cbc56..8b2a971 100644
--- a/Help/command/install.rst
+++ b/Help/command/install.rst
@@ -280,6 +280,14 @@ targets that link to the object libraries in their implementation.
Installing a target with the :prop_tgt:`EXCLUDE_FROM_ALL` target property
set to ``TRUE`` has undefined behavior.
+:command:`install(TARGETS)` can install targets that were created in
+other directories. When using such cross-directory install rules, running
+``make install`` (or similar) from a subdirectory will not guarantee that
+targets from other directories are up-to-date. You can use
+:command:`target_link_libraries` or :command:`add_dependencies`
+to ensure that such out-of-directory targets are built before the
+subdirectory-specific install rules are run.
+
The install destination given to the target install ``DESTINATION`` may
use "generator expressions" with the syntax ``$<...>``. See the
:manual:`cmake-generator-expressions(7)` manual for available expressions.