summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorTarget.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-11-03 16:44:32 -0400
committerBrad King <brad.king@kitware.com>2016-11-09 09:45:14 -0500
commit09cda9d5e7bb31f05177bdaf11d24aeaf85a8dd3 (patch)
treea755fd6424b16a66b008c998e108e7c1b43b64df /Source/cmGeneratorTarget.h
parent1d1f1eeb6a52d464d476eb0a46eb75c452e3dfbc (diff)
downloadcmake-09cda9d5e7bb31f05177bdaf11d24aeaf85a8dd3.tar.gz
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 'Source/cmGeneratorTarget.h')
-rw-r--r--Source/cmGeneratorTarget.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 3805bfc457..4c3c14ba94 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -147,6 +147,9 @@ public:
const cmGeneratorTarget* head,
bool usage_requirements_only) const;
+ /** Get the library name for an imported interface library. */
+ std::string GetImportedLibName(std::string const& config) const;
+
/** Get the full path to the target according to the settings in its
makefile and the configuration type. */
std::string GetFullPath(const std::string& config = "", bool implib = false,
@@ -643,6 +646,7 @@ private:
std::string Location;
std::string SOName;
std::string ImportLibrary;
+ std::string LibName;
std::string Languages;
std::string Libraries;
std::string LibrariesProp;