summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-03-07 15:03:48 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-03-07 15:04:13 (GMT)
commit49642079e5d13e82444da23ce8ae4fdee4daaa30 (patch)
treef0afdd8a29284f7536398402376388f83774a268 /Help
parent7e807479ffa2691d09eeae6e51322f34672dbef8 (diff)
parent9fb1dff0708792ba275fa841459d6d3875613cfa (diff)
downloadCMake-49642079e5d13e82444da23ce8ae4fdee4daaa30.zip
CMake-49642079e5d13e82444da23ce8ae4fdee4daaa30.tar.gz
CMake-49642079e5d13e82444da23ce8ae4fdee4daaa30.tar.bz2
Merge topic 'LINK_LIBRARY-libraries'
9fb1dff070 LINK_LIBRARY: Add features for library support on Apple 93a153bc7f Genx-LINK_LIBRARY: simplify framework features definitions Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7029
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake-generator-expressions.7.rst4
-rw-r--r--Help/release/dev/Apple-link-library.rst10
-rw-r--r--Help/variable/CMAKE_LANG_LINK_LIBRARY_USING_FEATURE.rst2
-rw-r--r--Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.rst2
-rw-r--r--Help/variable/LINK_LIBRARY_PREDEFINED_FEATURES.txt37
5 files changed, 44 insertions, 11 deletions
diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst
index 0ab4bc2..2394eb2 100644
--- a/Help/manual/cmake-generator-expressions.7.rst
+++ b/Help/manual/cmake-generator-expressions.7.rst
@@ -1157,7 +1157,7 @@ Output-Related Expressions
expression.
The ``library-list`` argument can hold CMake targets or external libraries.
- Any ``CMake`` target of type :ref:`OBJECT <Object Libraries>` or
+ Any CMake target of type :ref:`OBJECT <Object Libraries>` or
:ref:`INTERFACE <Interface Libraries>` will be ignored by this expression and
will be handled in the standard way.
@@ -1187,7 +1187,7 @@ Output-Related Expressions
``end-group``, as supported by ``GNU ld``, the :genex:`LINK_GROUP`
generator expression can be used.
- ``CMake`` pre-defines some features of general interest:
+ CMake pre-defines some features of general interest:
.. include:: ../variable/LINK_LIBRARY_PREDEFINED_FEATURES.txt
diff --git a/Help/release/dev/Apple-link-library.rst b/Help/release/dev/Apple-link-library.rst
new file mode 100644
index 0000000..ec4e3b6
--- /dev/null
+++ b/Help/release/dev/Apple-link-library.rst
@@ -0,0 +1,10 @@
+Apple-link-library
+------------------
+
+* The :genex:`LINK_LIBRARY` generator expression gained the ability to link
+ libraries in various ways when targeting ``Apple`` platforms. The following
+ new features were added:
+
+ * ``NEEDED_LIBRARY``
+ * ``REEXPORT_LIBRARY``
+ * ``WEAK_LIBRARY``
diff --git a/Help/variable/CMAKE_LANG_LINK_LIBRARY_USING_FEATURE.rst b/Help/variable/CMAKE_LANG_LINK_LIBRARY_USING_FEATURE.rst
index a9fa9a7..220ae99 100644
--- a/Help/variable/CMAKE_LANG_LINK_LIBRARY_USING_FEATURE.rst
+++ b/Help/variable/CMAKE_LANG_LINK_LIBRARY_USING_FEATURE.rst
@@ -22,6 +22,6 @@ features independent from the link language.
Predefined Features
^^^^^^^^^^^^^^^^^^^
-``CMake`` pre-defines some features of general interest:
+CMake pre-defines some features of general interest:
.. include:: LINK_LIBRARY_PREDEFINED_FEATURES.txt
diff --git a/Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.rst b/Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.rst
index 7aace32..05de570 100644
--- a/Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.rst
+++ b/Help/variable/CMAKE_LINK_LIBRARY_USING_FEATURE.rst
@@ -27,6 +27,6 @@ set.
Predefined Features
^^^^^^^^^^^^^^^^^^^
-``CMake`` pre-defines some features of general interest:
+CMake pre-defines some features of general interest:
.. include:: LINK_LIBRARY_PREDEFINED_FEATURES.txt
diff --git a/Help/variable/LINK_LIBRARY_PREDEFINED_FEATURES.txt b/Help/variable/LINK_LIBRARY_PREDEFINED_FEATURES.txt
index 82c406a..936bd31 100644
--- a/Help/variable/LINK_LIBRARY_PREDEFINED_FEATURES.txt
+++ b/Help/variable/LINK_LIBRARY_PREDEFINED_FEATURES.txt
@@ -1,6 +1,7 @@
**Features available in all environments**
-* ``DEFAULT``: This feature enables default link expression. This is mainly
+``DEFAULT``
+ This feature enables default link expression. This is mainly
useful with :prop_tgt:`LINK_LIBRARY_OVERRIDE` and
:prop_tgt:`LINK_LIBRARY_OVERRIDE_<LIBRARY>` target properties.
@@ -9,21 +10,27 @@
It is assumed that the linker used is the one provided by `XCode` or is
compatible with it.
-* ``FRAMEWORK``: This option tells the linker to search for the specified
+Framework support
+
+``FRAMEWORK``
+ This option tells the linker to search for the specified
framework (use linker option ``-framework``).
-* ``NEEDED_FRAMEWORK``: This is the same as the ``FRAMEWORK`` feature but means
+``NEEDED_FRAMEWORK``
+ This is the same as the ``FRAMEWORK`` feature but means
to really link with the framework even if no symbols are used from it (use
linker option ``-needed_framework``).
-* ``REEXPORT_FRAMEWORK``: This is the same as the ``FRAMEWORK`` feature but
+``REEXPORT_FRAMEWORK``
+ This is the same as the ``FRAMEWORK`` feature but
also specifies that all symbols in that framework should be available to
clients linking to the library being created (use linker option
``-reexport_framework``).
-* ``WEAK_FRAMEWORK``: This is the same as the ``FRAMEWORK`` feature but forces
+``WEAK_FRAMEWORK``
+ This is the same as the ``FRAMEWORK`` feature but forces
the framework and all references to it to be marked as weak imports (use
linker option ``-weak_framework``).
-Features for framework linking have a special handling in ``CMake``: the
-framework can be specified as a ``CMake`` framework target or file path. In the
+Features for framework linking have a special handling in CMake: the
+framework can be specified as a CMake framework target or file path. In the
first case, the target must have the :prop_tgt:`FRAMEWORK` target property set
as ``TRUE`` to enable framework handling. In the later case, if the path
includes a directory part, this one will be specified as framework search path
@@ -45,3 +52,19 @@ at link step.
* (/path/to/)?FwName(.framework)?
* (/path/to/)?FwName.framework/FwName
* (/path/to/)?FwName.framework/Versions/\*/FwName
+
+Library support
+
+``NEEDED_LIBRARY``
+ This is the same as specifying a link item (target or
+ library) but means to really link with the item even if no symbols are used
+ from it (use linker option ``-needed_library`` or ``-needed-l``).
+``REEXPORT_LIBRARY``
+ This is the same as specifying a link item (target or
+ library) but also specifies that all symbols in that item should be available
+ to clients linking to the library being created (use linker option
+ ``-reexport_library`` or ``-reexport-l``).
+``WEAK_LIBRARY``
+ This is the same as specifying a link item (target or
+ library) but forces the item and all references to it to be marked as weak
+ imports (use linker option ``-weak_library`` or ``-weak-l``).