diff options
| author | Brad King <brad.king@kitware.com> | 2010-06-07 18:36:28 (GMT) |
|---|---|---|
| committer | Brad King <brad.king@kitware.com> | 2010-06-07 18:36:28 (GMT) |
| commit | 6cf1ccd63270ab1a8ee790ff8faad17154870b5c (patch) | |
| tree | 5456e64a7c6b366480a45f02fa009ec2cef5d454 /Source/cmGlobalXCodeGenerator.cxx | |
| parent | 608406bf55ad6aa33acff382c15038e95314a587 (diff) | |
| parent | c8b13ecc380e38eda475974bc7ab515a65fe90cc (diff) | |
| download | CMake-6cf1ccd63270ab1a8ee790ff8faad17154870b5c.zip CMake-6cf1ccd63270ab1a8ee790ff8faad17154870b5c.tar.gz CMake-6cf1ccd63270ab1a8ee790ff8faad17154870b5c.tar.bz2 | |
Merge branch 'per-config-link-flags'
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
| -rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 0d6e389..537a88f 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1514,8 +1514,13 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, extraLinkOptions = this->CurrentMakefile-> GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS"); } - - const char* targetLinkFlags = target.GetProperty("LINK_FLAGS"); + + const char* linkFlagsProp = "LINK_FLAGS"; + if(target.GetType() == cmTarget::STATIC_LIBRARY) + { + linkFlagsProp = "STATIC_LIBRARY_FLAGS"; + } + const char* targetLinkFlags = target.GetProperty(linkFlagsProp); if(targetLinkFlags) { extraLinkOptions += " "; @@ -1523,7 +1528,8 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, } if(configName && *configName) { - std::string linkFlagsVar = "LINK_FLAGS_"; + std::string linkFlagsVar = linkFlagsProp; + linkFlagsVar += "_"; linkFlagsVar += cmSystemTools::UpperCase(configName); if(const char* linkFlags = target.GetProperty(linkFlagsVar.c_str())) { |
