summaryrefslogtreecommitdiffstats
path: root/Source/cmExportFileGenerator.cxx
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/cmExportFileGenerator.cxx
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/cmExportFileGenerator.cxx')
-rw-r--r--Source/cmExportFileGenerator.cxx18
1 files changed, 16 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;
- }
}
//----------------------------------------------------------------------------