summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorChristian Maaser <christian.maaser@thalesgroup.com>2013-06-14 11:28:00 (GMT)
committerBrad King <brad.king@kitware.com>2013-06-14 12:09:00 (GMT)
commitcfe6300a41392b79d95774c2778d33a55deaed48 (patch)
treeecdbb9a929ed67af7e2d6d3274a8447803e26822 /Source/cmVisualStudio10TargetGenerator.cxx
parent82771f186220b45a9aaf10ed416f1df135e56c36 (diff)
downloadCMake-cfe6300a41392b79d95774c2778d33a55deaed48.zip
CMake-cfe6300a41392b79d95774c2778d33a55deaed48.tar.gz
CMake-cfe6300a41392b79d95774c2778d33a55deaed48.tar.bz2
VS: Add support for .NET target framework version
Teach CMake to generate the TargetFrameworkVersion XML node as documented at http://msdn.microsoft.com/en-us/library/vstudio/ff770576.aspx from target property VS_DOTNET_TARGET_FRAMEWORK_VERSION.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index f8de3a8..2c9ec8e 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -280,6 +280,13 @@ void cmVisualStudio10TargetGenerator::Generate()
}
this->WriteString("<ProjectName>", 2);
(*this->BuildFileStream) << projLabel << "</ProjectName>\n";
+ if(const char* targetFrameworkVersion = this->Target->GetProperty(
+ "VS_DOTNET_TARGET_FRAMEWORK_VERSION"))
+ {
+ this->WriteString("<TargetFrameworkVersion>", 2);
+ (*this->BuildFileStream) << targetFrameworkVersion
+ << "</TargetFrameworkVersion>\n";
+ }
this->WriteString("</PropertyGroup>\n", 1);
this->WriteString("<Import Project="
"\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n",