diff options
author | Brad King <brad.king@kitware.com> | 2016-11-03 20:44:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-11-09 14:45:14 (GMT) |
commit | 09cda9d5e7bb31f05177bdaf11d24aeaf85a8dd3 (patch) | |
tree | a755fd6424b16a66b008c998e108e7c1b43b64df /Help/prop_tgt | |
parent | 1d1f1eeb6a52d464d476eb0a46eb75c452e3dfbc (diff) | |
download | CMake-09cda9d5e7bb31f05177bdaf11d24aeaf85a8dd3.zip CMake-09cda9d5e7bb31f05177bdaf11d24aeaf85a8dd3.tar.gz CMake-09cda9d5e7bb31f05177bdaf11d24aeaf85a8dd3.tar.bz2 |
Allow imported INTERFACE libraries to specify a link library name
Add an `IMPORTED_LIBNAME[_<CONFIG>]` target property to specify a library
name to be placed on the link line in place of an interface library
since it has no library file of its own. Restrict use of the property
to imported `INTERFACE` libraries.
This will be particularly useful for find modules that need to provide
imported libraries from system SDKs where the full path to the library
file is not known. Now such find modules will be able to provide an
imported interface library and set `IMPORTED_LIBNAME` to refer to the
SDK library by name.
Issue: #15267
Diffstat (limited to 'Help/prop_tgt')
-rw-r--r-- | Help/prop_tgt/IMPORTED_LIBNAME.rst | 23 | ||||
-rw-r--r-- | Help/prop_tgt/IMPORTED_LIBNAME_CONFIG.rst | 7 |
2 files changed, 30 insertions, 0 deletions
diff --git a/Help/prop_tgt/IMPORTED_LIBNAME.rst b/Help/prop_tgt/IMPORTED_LIBNAME.rst new file mode 100644 index 0000000..1943dba --- /dev/null +++ b/Help/prop_tgt/IMPORTED_LIBNAME.rst @@ -0,0 +1,23 @@ +IMPORTED_LIBNAME +---------------- + +Specify the link library name for an :ref:`imported <Imported Targets>` +:ref:`Interface Library <Interface Libraries>`. + +An interface library builds no library file itself but does specify +usage requirements for its consumers. The ``IMPORTED_LIBNAME`` +property may be set to specify a single library name to be placed +on the link line in place of the interface library target name as +a requirement for using the interface. + +This property is intended for use in naming libraries provided by +a platform SDK for which the full path to a library file may not +be known. The value may be a plain library name such as ``foo`` +but may *not* be a path (e.g. ``/usr/lib/libfoo.so``) or a flag +(e.g. ``-Wl,...``). The name is never treated as a library target +name even if it happens to name one. + +The ``IMPORTED_LIBNAME`` property is allowed only on +:ref:`imported <Imported Targets>` :ref:`Interface Libraries` +and is rejected on targets of other types (for which +the :prop_tgt:`IMPORTED_LOCATION` target property may be used). diff --git a/Help/prop_tgt/IMPORTED_LIBNAME_CONFIG.rst b/Help/prop_tgt/IMPORTED_LIBNAME_CONFIG.rst new file mode 100644 index 0000000..a28b838 --- /dev/null +++ b/Help/prop_tgt/IMPORTED_LIBNAME_CONFIG.rst @@ -0,0 +1,7 @@ +IMPORTED_LIBNAME_<CONFIG> +------------------------- + +<CONFIG>-specific version of :prop_tgt:`IMPORTED_LIBNAME` property. + +Configuration names correspond to those provided by the project from +which the target is imported. |