summaryrefslogtreecommitdiffstats
path: root/Help/prop_tgt
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2023-08-07 22:10:36 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-08-07 22:10:56 (GMT)
commitfeca1d51ff18faff5a51960407a6fdac5ebb89f8 (patch)
tree7cd5fc36766ad84d3d8755f947d4d4b39c0c3add /Help/prop_tgt
parent4240e74858aebf82fb1b371bf15f84e509d13966 (diff)
parent78e7ea598d2c1642ffbf8d402e8485ad590b322f (diff)
downloadCMake-feca1d51ff18faff5a51960407a6fdac5ebb89f8.zip
CMake-feca1d51ff18faff5a51960407a6fdac5ebb89f8.tar.gz
CMake-feca1d51ff18faff5a51960407a6fdac5ebb89f8.tar.bz2
Merge topic 'doc-fixups-release-3.27'
78e7ea598d cmLocalGenerator: Fix trivial spelling error in code comment 1285fe27ff Help: Improve formatting and fix wording for ENABLE_EXPORTS 91336d061c Help: Improve formatting and cross-references for DEPENDS_EXPLICIT_ONLY 03208d9e18 Help: Fix indenting within TARGET_RUNTIME_DLLS genex docs Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8688
Diffstat (limited to 'Help/prop_tgt')
-rw-r--r--Help/prop_tgt/ENABLE_EXPORTS.rst53
1 files changed, 28 insertions, 25 deletions
diff --git a/Help/prop_tgt/ENABLE_EXPORTS.rst b/Help/prop_tgt/ENABLE_EXPORTS.rst
index 3e9b285..e34c649 100644
--- a/Help/prop_tgt/ENABLE_EXPORTS.rst
+++ b/Help/prop_tgt/ENABLE_EXPORTS.rst
@@ -27,30 +27,33 @@ varies by platform:
referencing the executable since the dynamic loader will
automatically bind symbols when the module is loaded.
-This property is initialized by the value of the variable
-:variable:`CMAKE_EXECUTABLE_ENABLE_EXPORTS` if it is set when an executable
-target is created.
+This property is initialized by the value of the
+:variable:`CMAKE_EXECUTABLE_ENABLE_EXPORTS` variable, if it is set when an
+executable target is created. If :variable:`CMAKE_EXECUTABLE_ENABLE_EXPORTS`
+is not set, the :variable:`CMAKE_ENABLE_EXPORTS` variable is used to initialize
+the property instead for backward compatibility reasons.
+See below for alternative initialization behavior for shared library targets.
.. versionadded:: 3.27
- On macOS, to link with a shared library (standard one as well as framework),
- a linker import file (e.g. a text-based stubs file, with ``.tbd`` extension)
- can be used instead of the shared library itself.
-
-The generation of these linker import files, as well as the consumption, is
-controlled by this property. When this property is set to true, CMake will
-generate a ``.tbd`` file for each shared library created by
-:command:`add_library` command. This allow other targets to use this ``.tbd``
-file to link to the library with the :command:`target_link_libraries`
-command.
-
-.. note::
-
- For compatibility purpose, this property will be ignored if
- :prop_tgt:`XCODE_ATTRIBUTE_GENERATE_TEXT_BASED_STUBS <XCODE_ATTRIBUTE_<an-attribute>>`
- target property or the
- :variable:`CMAKE_XCODE_ATTRIBUTE_GENERATE_TEXT_BASED_STUBS <CMAKE_XCODE_ATTRIBUTE_<an-attribute>>`
- variable is set to ``NO``.
-
-This property is initialized by the value of the variable
-:variable:`CMAKE_SHARED_LIBRARY_ENABLE_EXPORTS` if it is set when a shared
-library target is created.
+ On Apple platforms, to link with a shared library (either a bare library or a
+ framework), a linker import file can be used instead of the actual shared
+ library. These linker import files are also known as text-based stubs, and
+ they have a ``.tbd`` file extension.
+
+ The generation of these linker import files, as well as their consumption, is
+ controlled by this property. When this property is set to true on a shared
+ library target, CMake will generate a ``.tbd`` file for the library.
+ Other targets that link to the shared library target will then use this
+ ``.tbd`` file when linking rather than linking to the shared library binary.
+
+ .. note::
+
+ For backward compatibility reasons, this property will be ignored if the
+ :prop_tgt:`XCODE_ATTRIBUTE_GENERATE_TEXT_BASED_STUBS <XCODE_ATTRIBUTE_<an-attribute>>`
+ target property or the
+ :variable:`CMAKE_XCODE_ATTRIBUTE_GENERATE_TEXT_BASED_STUBS <CMAKE_XCODE_ATTRIBUTE_<an-attribute>>`
+ variable is set to false.
+
+ For shared library targets, this property is initialized by the value of the
+ :variable:`CMAKE_SHARED_LIBRARY_ENABLE_EXPORTS` variable, if it is set when
+ the target is created.