mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-25 07:38:33 -05:00
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
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user