summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio71Generator.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/cmGlobalVisualStudio71Generator.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/cmGlobalVisualStudio71Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio71Generator.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx
index 05aec52..3f8d381 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -259,13 +259,18 @@ void cmGlobalVisualStudio71Generator::WriteProjectConfigurations(
std::string guid = this->GetGUID(name);
for (std::vector<std::string>::const_iterator i = configs.begin();
i != configs.end(); ++i) {
- fout << "\t\t{" << guid << "}." << *i << ".ActiveCfg = " << *i << "|"
- << platformName << std::endl;
+ const char* dstConfig = target.GetProperty("MAP_IMPORTED_CONFIG_" +
+ cmSystemTools::UpperCase(*i));
+ if (dstConfig == CM_NULLPTR) {
+ dstConfig = i->c_str();
+ }
+ fout << "\t\t{" << guid << "}." << *i << ".ActiveCfg = " << dstConfig
+ << "|" << platformName << std::endl;
std::set<std::string>::const_iterator ci =
configsPartOfDefaultBuild.find(*i);
if (!(ci == configsPartOfDefaultBuild.end())) {
- fout << "\t\t{" << guid << "}." << *i << ".Build.0 = " << *i << "|"
- << platformName << std::endl;
+ fout << "\t\t{" << guid << "}." << *i << ".Build.0 = " << dstConfig
+ << "|" << platformName << std::endl;
}
}
}