From 0698714c86fdb187caf5df336fb7e3c005271872 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 21 Oct 2013 09:35:09 -0400 Subject: [PATCH] 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 --- Source/cmLocalVisualStudio7Generator.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index f21abc3c0..30c3d737c 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -2050,6 +2050,11 @@ cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout, fout << "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\"\n"; } this->WriteProjectSCC(fout, target); + if(const char* targetFrameworkVersion = + target.GetProperty("VS_DOTNET_TARGET_FRAMEWORK_VERSION")) + { + fout << "\tTargetFrameworkVersion=\"" << targetFrameworkVersion << "\"\n"; + } fout << "\tKeyword=\"" << keyword << "\">\n" << "\t\n" << "\t\tPlatformName << "\"/>\n"