summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmExportFileGenerator.cxx18
-rw-r--r--Source/cmExportFileGenerator.h3
2 files changed, 19 insertions, 2 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index dd0c33a..d2c8ccb 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -135,7 +135,22 @@ cmExportFileGenerator
}
// Add the transitive link dependencies for this configuration.
- {
+ if(target->GetType() == cmTarget::STATIC_LIBRARY ||
+ target->GetType() == cmTarget::SHARED_LIBRARY)
+ {
+ this->SetImportLinkProperties(config, suffix, target, properties);
+ }
+}
+
+//----------------------------------------------------------------------------
+void
+cmExportFileGenerator
+::SetImportLinkProperties(const char* config, std::string const& suffix,
+ cmTarget* target, ImportPropertyMap& properties)
+{
+ // Get the makefile in which to lookup target information.
+ cmMakefile* mf = target->GetMakefile();
+
// Compute which library configuration to link.
cmTarget::LinkLibraryType linkType = cmTarget::OPTIMIZED;
if(config && cmSystemTools::UpperCase(config) == "DEBUG")
@@ -193,7 +208,6 @@ cmExportFileGenerator
std::string prop = "IMPORTED_LINK_LIBRARIES";
prop += suffix;
properties[prop] = link_libs;
- }
}
//----------------------------------------------------------------------------
diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h
index 8edf82e..27d998b 100644
--- a/Source/cmExportFileGenerator.h
+++ b/Source/cmExportFileGenerator.h
@@ -67,6 +67,9 @@ protected:
void SetImportDetailProperties(const char* config,
std::string const& suffix, cmTarget* target,
ImportPropertyMap& properties);
+ void SetImportLinkProperties(const char* config,
+ std::string const& suffix, cmTarget* target,
+ ImportPropertyMap& properties);
/** Each subclass knows how to generate its kind of export file. */
virtual bool GenerateMainFile(std::ostream& os) = 0;