summaryrefslogtreecommitdiffstats
path: root/Source/cmExportFileGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmExportFileGenerator.cxx')
-rw-r--r--Source/cmExportFileGenerator.cxx31
1 files changed, 18 insertions, 13 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 3d7eccc..aeef602 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -752,9 +752,9 @@ void cmExportFileGenerator::SetImportLinkInterface(
if (iface->ImplementationIsInterface) {
// Policy CMP0022 must not be NEW.
- this->SetImportLinkProperty(suffix, target,
- "IMPORTED_LINK_INTERFACE_LIBRARIES",
- iface->Libraries, properties, missingTargets);
+ this->SetImportLinkProperty(
+ suffix, target, "IMPORTED_LINK_INTERFACE_LIBRARIES", iface->Libraries,
+ properties, missingTargets, ImportLinkPropertyTargetNames::Yes);
return;
}
@@ -832,14 +832,14 @@ void cmExportFileGenerator::SetImportDetailProperties(
// Add the transitive link dependencies for this configuration.
if (cmLinkInterface const* iface =
target->GetLinkInterface(config, target)) {
- this->SetImportLinkProperty(suffix, target,
- "IMPORTED_LINK_INTERFACE_LANGUAGES",
- iface->Languages, properties, missingTargets);
+ this->SetImportLinkProperty(
+ suffix, target, "IMPORTED_LINK_INTERFACE_LANGUAGES", iface->Languages,
+ properties, missingTargets, ImportLinkPropertyTargetNames::No);
std::vector<std::string> dummy;
- this->SetImportLinkProperty(suffix, target,
- "IMPORTED_LINK_DEPENDENT_LIBRARIES",
- iface->SharedDeps, properties, dummy);
+ this->SetImportLinkProperty(
+ suffix, target, "IMPORTED_LINK_DEPENDENT_LIBRARIES", iface->SharedDeps,
+ properties, dummy, ImportLinkPropertyTargetNames::Yes);
if (iface->Multiplicity > 0) {
std::string prop =
cmStrCat("IMPORTED_LINK_INTERFACE_MULTIPLICITY", suffix);
@@ -880,7 +880,8 @@ template <typename T>
void cmExportFileGenerator::SetImportLinkProperty(
std::string const& suffix, cmGeneratorTarget* target,
const std::string& propName, std::vector<T> const& entries,
- ImportPropertyMap& properties, std::vector<std::string>& missingTargets)
+ ImportPropertyMap& properties, std::vector<std::string>& missingTargets,
+ ImportLinkPropertyTargetNames targetNames)
{
// Skip the property if there are no entries.
if (entries.empty()) {
@@ -895,9 +896,13 @@ void cmExportFileGenerator::SetImportLinkProperty(
link_entries += sep;
sep = ";";
- std::string temp = asString(l);
- this->AddTargetNamespace(temp, target, missingTargets);
- link_entries += temp;
+ if (targetNames == ImportLinkPropertyTargetNames::Yes) {
+ std::string temp = asString(l);
+ this->AddTargetNamespace(temp, target, missingTargets);
+ link_entries += temp;
+ } else {
+ link_entries += asString(l);
+ }
}
// Store the property.