diff options
author | Brad King <brad.king@kitware.com> | 2015-04-03 17:38:04 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-04-03 17:38:04 (GMT) |
commit | b6b77bb750f30c452053ad4c28e4c69b1e7950e0 (patch) | |
tree | db0a998d4f1e111264c0e2f12e3278c3ea4fff24 /Help/include/INTERFACE_LINK_LIBRARIES_WARNING.txt | |
parent | 84136c5a83bf9e1caf158a37f987465a8f39f8d0 (diff) | |
parent | 3af137824d993ca0a7c18c0768efb12b76154ad0 (diff) | |
download | CMake-b6b77bb750f30c452053ad4c28e4c69b1e7950e0.zip CMake-b6b77bb750f30c452053ad4c28e4c69b1e7950e0.tar.gz CMake-b6b77bb750f30c452053ad4c28e4c69b1e7950e0.tar.bz2 |
Merge topic 'doc-relocatable-usage-requirements'
3af13782 Help: Update discussion of relocable packages in cmake-packages(7)
227992c3 Help: Reorganize and refine discussion of relocatable packages
031d894f Help: Place relocatable package notes in their own subsections
6e331ce9 Help: Fix typo in cmake-packages(7) manual
ba9b9d79 Help: Fix syntax in non-relocatable usage requirements example
Diffstat (limited to 'Help/include/INTERFACE_LINK_LIBRARIES_WARNING.txt')
-rw-r--r-- | Help/include/INTERFACE_LINK_LIBRARIES_WARNING.txt | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/Help/include/INTERFACE_LINK_LIBRARIES_WARNING.txt b/Help/include/INTERFACE_LINK_LIBRARIES_WARNING.txt index ceefa4d..46e84ac 100644 --- a/Help/include/INTERFACE_LINK_LIBRARIES_WARNING.txt +++ b/Help/include/INTERFACE_LINK_LIBRARIES_WARNING.txt @@ -1,23 +1,10 @@ Note that it is not advisable to populate the -|INTERFACE_PROPERTY_LINK| of a target with paths for dependencies. -That would hard-code into installed packages the include directory paths +|INTERFACE_PROPERTY_LINK| of a target with absolute paths to dependencies. +That would hard-code into installed packages the library file paths for dependencies **as found on the machine the package was made on**. -That is, code like this is incorrect for targets which will be used to -generate :manual:`cmake-packages(7)`: - -.. code-block:: cmake - - target_link_libraries(mylib INTERFACE - ${Boost_LIBRARIES};${OtherDep_LIBRARIES} - ) - -Dependencies must provide their own :ref:`IMPORTED targets <Imported Targets>` -which have their own :prop_tgt:`IMPORTED_LOCATION` populated -appropriately. That way, when a consumer uses the installed package, the -consumer will run the appropriate :command:`find_package` command to find -the dependencies on their own machine and populate the -:ref:`IMPORTED targets <Imported Targets>` with appropriate paths. See -:ref:`Creating Packages` for more. Note that many modules currently shipped -with CMake do not currently provide :ref:`IMPORTED targets <Imported Targets>`. +See the :ref:`Creating Relocatable Packages` section of the +:manual:`cmake-packages(7)` manual for discussion of additional care +that must be taken when specifying usage requirements while creating +packages for redistribution. |