summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileLibraryTargetGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-04-03 16:57:51 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-04-03 16:57:51 (GMT)
commit3c8e899102dc58efa5301240f5bf5bf2225c2b65 (patch)
treeea7b3aa1cf42176e6719ffe9506ec76e4dcd1c9d /Source/cmMakefileLibraryTargetGenerator.cxx
parent32b63ef915eadc1d5e48c63e09ca1a65e0f0ca52 (diff)
downloadCMake-3c8e899102dc58efa5301240f5bf5bf2225c2b65.zip
CMake-3c8e899102dc58efa5301240f5bf5bf2225c2b65.tar.gz
CMake-3c8e899102dc58efa5301240f5bf5bf2225c2b65.tar.bz2
ENH: add support for per config target LINK_FLAGS
Diffstat (limited to 'Source/cmMakefileLibraryTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 6cf5be9..bf5d55c 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -109,6 +109,11 @@ void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink)
std::string extraFlags;
this->LocalGenerator->AppendFlags(extraFlags, this->Target->GetProperty("LINK_FLAGS"));
+ std::string linkFlagsConfig = "LINK_FLAGS_";
+ linkFlagsConfig += cmSystemTools::UpperCase(this->LocalGenerator->ConfigurationName.c_str());
+ this->LocalGenerator->AppendFlags(extraFlags,
+ this->Target->GetProperty(linkFlagsConfig.c_str()));
+
this->LocalGenerator->AddConfigVariableFlags(extraFlags, "CMAKE_SHARED_LINKER_FLAGS",
this->LocalGenerator->ConfigurationName.c_str());
if(this->Makefile->IsOn("WIN32") && !(this->Makefile->IsOn("CYGWIN") || this->Makefile->IsOn("MINGW")))
@@ -143,6 +148,10 @@ void cmMakefileLibraryTargetGenerator::WriteModuleLibraryRules(bool relink)
std::string extraFlags;
this->LocalGenerator->AppendFlags(extraFlags, this->Target->GetProperty("LINK_FLAGS"));
+ std::string linkFlagsConfig = "LINK_FLAGS_";
+ linkFlagsConfig += cmSystemTools::UpperCase(this->LocalGenerator->ConfigurationName.c_str());
+ this->LocalGenerator->AppendFlags(extraFlags,
+ this->Target->GetProperty(linkFlagsConfig.c_str()));
this->LocalGenerator->AddConfigVariableFlags(extraFlags, "CMAKE_MODULE_LINKER_FLAGS",
this->LocalGenerator->ConfigurationName.c_str());
// TODO: .def files should be supported here also.