diff options
Diffstat (limited to 'share/cmake-3.2/Help/include/INTERFACE_LINK_LIBRARIES_WARNING.txt')
-rwxr-xr-x | share/cmake-3.2/Help/include/INTERFACE_LINK_LIBRARIES_WARNING.txt | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/share/cmake-3.2/Help/include/INTERFACE_LINK_LIBRARIES_WARNING.txt b/share/cmake-3.2/Help/include/INTERFACE_LINK_LIBRARIES_WARNING.txt deleted file mode 100755 index ceefa4d..0000000 --- a/share/cmake-3.2/Help/include/INTERFACE_LINK_LIBRARIES_WARNING.txt +++ /dev/null @@ -1,23 +0,0 @@ - -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 -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>`. |