Browse Source

Help: Cross-reference LINK_LIBRARIES and INTERFACE_LINK_LIBRARIES

Document in each property its role in combination with the other.
Brad King 3 years ago
parent
commit
d2f4f17b90
2 changed files with 12 additions and 2 deletions
  1. 7 0
      Help/prop_tgt/INTERFACE_LINK_LIBRARIES.rst
  2. 5 2
      Help/prop_tgt/LINK_LIBRARIES.rst

+ 7 - 0
Help/prop_tgt/INTERFACE_LINK_LIBRARIES.rst

@@ -12,6 +12,13 @@ other target also.  This property is overridden by the
 :prop_tgt:`LINK_INTERFACE_LIBRARIES_<CONFIG>` property if policy
 :policy:`CMP0022` is ``OLD`` or unset.
 
+The value of this property is used by the generators when constructing
+the link rule for a dependent target.  A dependent target's direct
+link dependencies, specified by its :prop_tgt:`LINK_LIBRARIES` target
+property, are linked first, followed by indirect dependencies from the
+transitive closure of the direct dependencies'
+``INTERFACE_LINK_LIBRARIES`` properties.  See policy :policy:`CMP0022`.
+
 Contents of ``INTERFACE_LINK_LIBRARIES`` may use "generator expressions"
 with the syntax ``$<...>``.  See the :manual:`cmake-generator-expressions(7)`
 manual for available expressions.  See the :manual:`cmake-buildsystem(7)`

+ 5 - 2
Help/prop_tgt/LINK_LIBRARIES.rst

@@ -8,8 +8,11 @@ used for linking.  In addition to accepting values from the
 :command:`target_link_libraries` command, values may be set directly on
 any target using the :command:`set_property` command.
 
-The value of this property is used by the generators to set the link
-libraries for the compiler.
+The value of this property is used by the generators to construct the
+link rule for the target.  The direct link dependencies are linked first,
+followed by indirect dependencies from the transitive closure of the
+direct dependencies' :prop_tgt:`INTERFACE_LINK_LIBRARIES` properties.
+See policy :policy:`CMP0022`.
 
 Contents of ``LINK_LIBRARIES`` may use "generator expressions" with the
 syntax ``$<...>``.  See the :manual:`cmake-generator-expressions(7)` manual