summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-04-05 15:34:16 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-04-05 15:34:24 (GMT)
commit792027f70f2cd17c9dc1913ec3143900fda16e1f (patch)
treed144ee0497b1d40e7b9732c67f26628dae352fa8 /Help
parent3d700254f4c4b7e4dde61ea16991964d221185ad (diff)
parent4d6e899578a9bb13635b0b46a37b7e9ab4cdf5e0 (diff)
downloadCMake-792027f70f2cd17c9dc1913ec3143900fda16e1f.zip
CMake-792027f70f2cd17c9dc1913ec3143900fda16e1f.tar.gz
CMake-792027f70f2cd17c9dc1913ec3143900fda16e1f.tar.bz2
Merge topic 'doc-imported-soname'
4d6e899578 Help: Document in add_library how to import libraries with SONAME Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5975
Diffstat (limited to 'Help')
-rw-r--r--Help/command/add_library.rst24
1 files changed, 18 insertions, 6 deletions
diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst
index d3fbdcf..dfc6500 100644
--- a/Help/command/add_library.rst
+++ b/Help/command/add_library.rst
@@ -189,12 +189,24 @@ The ``<type>`` must be one of:
References a library file located outside the project. The
:prop_tgt:`IMPORTED_LOCATION` target property (or its per-configuration
variant :prop_tgt:`IMPORTED_LOCATION_<CONFIG>`) specifies the
- location of the main library file on disk. In the case of a ``SHARED``
- library on Windows, the :prop_tgt:`IMPORTED_IMPLIB` target property
- (or its per-configuration variant :prop_tgt:`IMPORTED_IMPLIB_<CONFIG>`)
- specifies the location of the DLL import library file (``.lib`` or
- ``.dll.a``) on disk, and the ``IMPORTED_LOCATION`` is the location of
- the ``.dll`` runtime library (and is optional).
+ location of the main library file on disk:
+
+ * For a ``SHARED`` library on most non-Windows platforms, the main library
+ file is the ``.so`` or ``.dylib`` file used by both linkers and dynamic
+ loaders. If the referenced library file has a ``SONAME`` (or on macOS,
+ has a ``LC_ID_DYLIB`` starting in ``@rpath/``), the value of that field
+ should be set in the :prop_tgt:`IMPORTED_SONAME` target property.
+ If the referenced library file does not have a ``SONAME``, but the
+ platform supports it, then the :prop_tgt:`IMPORTED_NO_SONAME` target
+ property should be set.
+
+ * For a ``SHARED`` library on Windows, the :prop_tgt:`IMPORTED_IMPLIB`
+ target property (or its per-configuration variant
+ :prop_tgt:`IMPORTED_IMPLIB_<CONFIG>`) specifies the location of the
+ DLL import library file (``.lib`` or ``.dll.a``) on disk, and the
+ ``IMPORTED_LOCATION`` is the location of the ``.dll`` runtime
+ library (and is optional).
+
Additional usage requirements may be specified in ``INTERFACE_*`` properties.
An ``UNKNOWN`` library type is typically only used in the implementation of