summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-01-12 22:14:40 (GMT)
committerBrad King <brad.king@kitware.com>2022-01-29 11:48:13 (GMT)
commitf3ad061858d03cc2a0569f903df3560152106050 (patch)
treebe604880c112a5b7b6eeee586cf2238c4e952c3e /Source/cmGeneratorTarget.h
parent193a999cd5ed345d79b91dae1fd284248ec93ba2 (diff)
downloadCMake-f3ad061858d03cc2a0569f903df3560152106050.zip
CMake-f3ad061858d03cc2a0569f903df3560152106050.tar.gz
CMake-f3ad061858d03cc2a0569f903df3560152106050.tar.bz2
Add usage requirements to update direct link dependencies
Link line construction starts with `LINK_LIBRARIES` and appends dependencies from the transitive closure of `INTERFACE_LINK_LIBRARIES`. Only the entries of `LINK_LIBRARIES` are considered direct link dependencies. In some advanced use cases, particularly involving static libraries and static plugins, usage requirements need to update the list of direct link dependencies. This may mean adding new items, removing existing items, or both. Add target properties to encode these usage requirements: * INTERFACE_LINK_LIBRARIES_DIRECT * INTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE Fixes: #22496
Diffstat (limited to 'Source/cmGeneratorTarget.h')
-rw-r--r--Source/cmGeneratorTarget.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index f36e2be..0dbc940 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -1001,8 +1001,10 @@ private:
std::string ImportLibrary;
std::string LibName;
std::string Languages;
- std::vector<BT<std::string>> Libraries;
std::string LibrariesProp;
+ std::vector<BT<std::string>> Libraries;
+ std::vector<BT<std::string>> LibrariesHeadInclude;
+ std::vector<BT<std::string>> LibrariesHeadExclude;
std::string SharedDeps;
};
@@ -1063,10 +1065,16 @@ private:
bool IsLinkLookupScope(std::string const& n,
cmLocalGenerator const*& lg) const;
+ enum class LinkInterfaceField
+ {
+ Libraries,
+ HeadExclude,
+ HeadInclude,
+ };
void ExpandLinkItems(std::string const& prop, cmBTStringRange entries,
std::string const& config,
const cmGeneratorTarget* headTarget,
- LinkInterfaceFor interfaceFor,
+ LinkInterfaceFor interfaceFor, LinkInterfaceField field,
cmLinkInterface& iface) const;
struct LookupLinkItemScope