summaryrefslogtreecommitdiffstats
path: root/Source/cmExportLibraryDependencies.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-02-20 18:36:38 (GMT)
committerBrad King <brad.king@kitware.com>2008-02-20 18:36:38 (GMT)
commit5e72a0d4e4e5ddd6817b294942af41dbb76b1e01 (patch)
treea3645d12ff2003d3128e5e9591e8624f2afa4322 /Source/cmExportLibraryDependencies.cxx
parentcfd65e29da5406e5ef4b5734cfaa2a0a0c82de35 (diff)
downloadCMake-5e72a0d4e4e5ddd6817b294942af41dbb76b1e01.zip
CMake-5e72a0d4e4e5ddd6817b294942af41dbb76b1e01.tar.gz
CMake-5e72a0d4e4e5ddd6817b294942af41dbb76b1e01.tar.bz2
ENH: Deprecate export_library_dependencies
- Reference export() and install(EXPORT) - Fix to support OUTPUT_NAME in simple cases
Diffstat (limited to 'Source/cmExportLibraryDependencies.cxx')
-rw-r--r--Source/cmExportLibraryDependencies.cxx19
1 files changed, 15 insertions, 4 deletions
diff --git a/Source/cmExportLibraryDependencies.cxx b/Source/cmExportLibraryDependencies.cxx
index ac9df30..cd36e06 100644
--- a/Source/cmExportLibraryDependencies.cxx
+++ b/Source/cmExportLibraryDependencies.cxx
@@ -80,8 +80,8 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() const
// Collect dependency information about all library targets built in
// the project.
- const cmake* cm = this->Makefile->GetCMakeInstance();
- const cmGlobalGenerator* global = cm->GetGlobalGenerator();
+ cmake* cm = this->Makefile->GetCMakeInstance();
+ cmGlobalGenerator* global = cm->GetGlobalGenerator();
const std::vector<cmLocalGenerator *>& locals = global->GetLocalGenerators();
std::map<cmStdString, cmStdString> libDepsOld;
std::map<cmStdString, cmStdString> libDepsNew;
@@ -137,9 +137,20 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() const
ltValue = "optimized";
break;
}
- valueOld += li->first;
+ std::string lib = li->first;
+ if(cmTarget* libtgt = global->FindTarget(0, lib.c_str()))
+ {
+ // Handle simple output name changes. This command is
+ // deprecated so we do not support full target name
+ // translation (which requires per-configuration info).
+ if(const char* outname = libtgt->GetProperty("OUTPUT_NAME"))
+ {
+ lib = outname;
+ }
+ }
+ valueOld += lib;
valueOld += ";";
- valueNew += li->first;
+ valueNew += lib;
valueNew += ";";
std::string& ltEntry = libTypes[ltVar];