summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorLeonid Yurchenko <nocturne@qarea.com>2012-04-16 14:07:19 (GMT)
committerBrad King <brad.king@kitware.com>2012-04-16 14:17:03 (GMT)
commit59139031a1aa24231b9302aa4cd8ecc4e22fb594 (patch)
tree297337f0f3f22ef31cfc9b04f7cf59d1536dde1f /Source/cmGlobalVisualStudio7Generator.cxx
parent31e7fadbb3bfd225e0d48e2d072ccc745d7f2689 (diff)
downloadCMake-59139031a1aa24231b9302aa4cd8ecc4e22fb594.zip
CMake-59139031a1aa24231b9302aa4cd8ecc4e22fb594.tar.gz
CMake-59139031a1aa24231b9302aa4cd8ecc4e22fb594.tar.bz2
include_external_msproject: Add TYPE, GUID, PLATFORM options (#13120)
These allow one to reference more external VS project file variations.
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx25
1 files changed, 18 insertions, 7 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index a68e6d8..09b200f 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -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)