summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-01-28 18:37:59 (GMT)
committerBrad King <brad.king@kitware.com>2008-01-28 18:37:59 (GMT)
commit437043bb04da113bf822aa42d5cf3a3cc3366be1 (patch)
tree00fada48e399d1c2b27fdc3d296cec73923130d8 /Source
parent6388ebceb12e8eca3ce0e30528f0edaa990c8f7a (diff)
downloadCMake-437043bb04da113bf822aa42d5cf3a3cc3366be1.zip
CMake-437043bb04da113bf822aa42d5cf3a3cc3366be1.tar.gz
CMake-437043bb04da113bf822aa42d5cf3a3cc3366be1.tar.bz2
BUG: Fix export/import file generation to not store link dependencies of executables or modules.
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;