mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-05 13:50:10 -05:00
include_external_msproject: Add TYPE, GUID, PLATFORM options (#13120)
These allow one to reference more external VS project file variations.
This commit is contained in:
committed by
Brad King
parent
31e7fadbb3
commit
59139031a1
@@ -251,7 +251,8 @@ void cmGlobalVisualStudio7Generator::WriteTargetConfigurations(
|
||||
if(expath)
|
||||
{
|
||||
this->WriteProjectConfigurations(fout, target->GetName(),
|
||||
true);
|
||||
true,
|
||||
target->GetProperty("VS_PLATFORM_MAPPING"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -286,8 +287,12 @@ void cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
|
||||
{
|
||||
std::string project = target->GetName();
|
||||
std::string location = expath;
|
||||
this->WriteExternalProject(fout, project.c_str(),
|
||||
location.c_str(), target->GetUtilities());
|
||||
|
||||
this->WriteExternalProject(fout,
|
||||
project.c_str(),
|
||||
location.c_str(),
|
||||
target->GetProperty("VS_PROJECT_TYPE"),
|
||||
target->GetUtilities());
|
||||
written = true;
|
||||
}
|
||||
else
|
||||
@@ -580,18 +585,20 @@ cmGlobalVisualStudio7Generator
|
||||
// executables to the libraries it uses are also done here
|
||||
void cmGlobalVisualStudio7Generator
|
||||
::WriteProjectConfigurations(std::ostream& fout, const char* name,
|
||||
bool partOfDefaultBuild)
|
||||
bool partOfDefaultBuild, const char* platformMapping)
|
||||
{
|
||||
std::string guid = this->GetGUID(name);
|
||||
for(std::vector<std::string>::iterator i = this->Configurations.begin();
|
||||
i != this->Configurations.end(); ++i)
|
||||
{
|
||||
fout << "\t\t{" << guid << "}." << *i
|
||||
<< ".ActiveCfg = " << *i << "|Win32\n";
|
||||
<< ".ActiveCfg = " << *i << "|"
|
||||
<< (platformMapping ? platformMapping : "Win32") << "\n";
|
||||
if(partOfDefaultBuild)
|
||||
{
|
||||
fout << "\t\t{" << guid << "}." << *i
|
||||
<< ".Build.0 = " << *i << "|Win32\n";
|
||||
<< ".Build.0 = " << *i << "|"
|
||||
<< (platformMapping ? platformMapping : "Win32") << "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -604,10 +611,14 @@ void cmGlobalVisualStudio7Generator
|
||||
void cmGlobalVisualStudio7Generator::WriteExternalProject(std::ostream& fout,
|
||||
const char* name,
|
||||
const char* location,
|
||||
const char* typeGuid,
|
||||
const std::set<cmStdString>&)
|
||||
{
|
||||
std::string d = cmSystemTools::ConvertToOutputPath(location);
|
||||
fout << "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \""
|
||||
fout << "Project("
|
||||
<< "\"{"
|
||||
<< (typeGuid ? typeGuid : "8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942")
|
||||
<< "}\") = \""
|
||||
<< name << "\", \""
|
||||
<< this->ConvertToSolutionPath(location) << "\", \"{"
|
||||
<< this->GetGUID(name)
|
||||
|
||||
Reference in New Issue
Block a user