From 847bda527000f6adc41f86d7c9ecc3ffb0ae1d50 Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Fri, 1 Aug 2003 09:11:04 -0400 Subject: [PATCH] fix for bug # 101 --- Source/cmExportLibraryDependencies.cxx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Source/cmExportLibraryDependencies.cxx b/Source/cmExportLibraryDependencies.cxx index 2e859670e..e73280f67 100644 --- a/Source/cmExportLibraryDependencies.cxx +++ b/Source/cmExportLibraryDependencies.cxx @@ -84,6 +84,8 @@ void cmExportLibraryDependenciesCommand::FinalPass() { cmLocalGenerator* gen = *i; cmTargets &tgts = gen->GetMakefile()->GetTargets(); + std::vector depends; + const char *defType; for(cmTargets::const_iterator l = tgts.begin(); l != tgts.end(); ++l) { @@ -96,6 +98,20 @@ void cmExportLibraryDependenciesCommand::FinalPass() if(def) { fout << "SET(" << libDepName << " \"" << def << "\")\n"; + // now for each dependency, check for link type + cmSystemTools::ExpandListArgument(def, depends); + for(std::vector::const_iterator d = depends.begin(); + d != depends.end(); ++d) + { + libDepName = *d; + libDepName += "_LINK_TYPE"; + defType = m_Makefile->GetDefinition(libDepName.c_str()); + libDepName = cmSystemTools::EscapeSpaces(libDepName.c_str()); + if(defType) + { + fout << "SET(" << libDepName << " \"" << defType << "\")\n"; + } + } } } }