diff options
author | Brad King <brad.king@kitware.com> | 2017-09-13 09:43:24 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-09-13 09:43:24 -0400 |
commit | 64e973e991636f296cb2bf4f3c0e4ec26463a7b1 (patch) | |
tree | ca5c3ebe20bb69f20080e21d89682b8d1e9668ec /Source/cmGlobalVisualStudio8Generator.cxx | |
parent | 420874bfaa20772525c60b20d1ee5b6ef5ed9298 (diff) | |
parent | c5b5bb270f54dab4ff529688a26ea8aa271fa0e1 (diff) | |
download | cmake-64e973e991636f296cb2bf4f3c0e4ec26463a7b1.tar.gz |
Merge branch 'backport-vs-fix-config-map' into vs-fix-config-map
Diffstat (limited to 'Source/cmGlobalVisualStudio8Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio8Generator.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 728ad2dedb..f56c78b584 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -354,10 +354,16 @@ 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 == nullptr) { - dstConfig = i->c_str(); + std::vector<std::string> mapConfig; + const char* dstConfig = i->c_str(); + if (target.GetProperty("EXTERNAL_MSPROJECT")) { + if (const char* m = target.GetProperty("MAP_IMPORTED_CONFIG_" + + cmSystemTools::UpperCase(*i))) { + cmSystemTools::ExpandListArgument(m, mapConfig); + if (!mapConfig.empty()) { + dstConfig = mapConfig[0].c_str(); + } + } } fout << "\t\t{" << guid << "}." << *i << "|" << this->GetPlatformName() << ".ActiveCfg = " << dstConfig << "|" |