mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 13:51:33 -06:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user