summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio8Generator.cxx
diff options
context:
space:
mode:
authorBeeble <beeble@users.noreply.github.com>2017-04-04 19:13:35 (GMT)
committerBrad King <brad.king@kitware.com>2017-04-05 17:44:03 (GMT)
commit227de0b95d6fd12e47da502ce34e8aea6d57cc43 (patch)
treec08c1f0ac43c53706519b8e51cd3905f1b18a2de /Source/cmGlobalVisualStudio8Generator.cxx
parent4cd815f0b314197ddabea94017e0ce8b15836c17 (diff)
downloadCMake-227de0b95d6fd12e47da502ce34e8aea6d57cc43.zip
CMake-227de0b95d6fd12e47da502ce34e8aea6d57cc43.tar.gz
CMake-227de0b95d6fd12e47da502ce34e8aea6d57cc43.tar.bz2
include_external_msproject: Honor MAP_IMPORTED_CONFIG_<CONFIG>
This allows projects added via `include_external_msproject` to compile the preferred configuration despite different naming conventions.
Diffstat (limited to 'Source/cmGlobalVisualStudio8Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 13a9ab3..634db7f 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -361,8 +361,13 @@ void cmGlobalVisualStudio8Generator::WriteProjectConfigurations(
std::string guid = this->GetGUID(name);
for (std::vector<std::string>::const_iterator i = configs.begin();
i != configs.end(); ++i) {
+ const char* dstConfig = target.GetProperty("MAP_IMPORTED_CONFIG_" +
+ cmSystemTools::UpperCase(*i));
+ if (dstConfig == CM_NULLPTR) {
+ dstConfig = i->c_str();
+ }
fout << "\t\t{" << guid << "}." << *i << "|" << this->GetPlatformName()
- << ".ActiveCfg = " << *i << "|"
+ << ".ActiveCfg = " << dstConfig << "|"
<< (!platformMapping.empty() ? platformMapping
: this->GetPlatformName())
<< "\n";
@@ -370,14 +375,14 @@ void cmGlobalVisualStudio8Generator::WriteProjectConfigurations(
configsPartOfDefaultBuild.find(*i);
if (!(ci == configsPartOfDefaultBuild.end())) {
fout << "\t\t{" << guid << "}." << *i << "|" << this->GetPlatformName()
- << ".Build.0 = " << *i << "|"
+ << ".Build.0 = " << dstConfig << "|"
<< (!platformMapping.empty() ? platformMapping
: this->GetPlatformName())
<< "\n";
}
if (this->NeedsDeploy(target.GetType())) {
fout << "\t\t{" << guid << "}." << *i << "|" << this->GetPlatformName()
- << ".Deploy.0 = " << *i << "|"
+ << ".Deploy.0 = " << dstConfig << "|"
<< (!platformMapping.empty() ? platformMapping
: this->GetPlatformName())
<< "\n";