VS: Set .NET target framework version for VS 7-9 (#14499)

Teach the VS 7-9 generators to honor the

 VS_DOTNET_TARGET_FRAMEWORK_VERSION

target property.  This was already done for VS >= 10 by commit cfe6300a
(VS: Add support for .NET target framework version, 2013-06-14).

Inspired-by: mar.na@t-online.de
This commit is contained in:
Brad King 2013-10-21 09:35:09 -04:00
parent 936dec32e5
commit 0698714c86
1 changed files with 5 additions and 0 deletions

View File

@ -2050,6 +2050,11 @@ cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout,
fout << "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\"\n"; fout << "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\"\n";
} }
this->WriteProjectSCC(fout, target); this->WriteProjectSCC(fout, target);
if(const char* targetFrameworkVersion =
target.GetProperty("VS_DOTNET_TARGET_FRAMEWORK_VERSION"))
{
fout << "\tTargetFrameworkVersion=\"" << targetFrameworkVersion << "\"\n";
}
fout << "\tKeyword=\"" << keyword << "\">\n" fout << "\tKeyword=\"" << keyword << "\">\n"
<< "\t<Platforms>\n" << "\t<Platforms>\n"
<< "\t\t<Platform\n\t\t\tName=\"" << this->PlatformName << "\"/>\n" << "\t\t<Platform\n\t\t\tName=\"" << this->PlatformName << "\"/>\n"