summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorMichael Stürmer <michael.stuermer@schaeffler.com>2018-05-03 04:57:08 (GMT)
committerMichael Stürmer <michael.stuermer@schaeffler.com>2018-05-15 07:00:31 (GMT)
commit71a033616a748d1bb4286ca0667cedf6b57df217 (patch)
tree685abddcc1baf6e244770125579c0b07806d974d /Source/cmVisualStudio10TargetGenerator.cxx
parentd793b482d914e0d8706b901dceeb1b5f0c405413 (diff)
downloadCMake-71a033616a748d1bb4286ca0667cedf6b57df217.zip
CMake-71a033616a748d1bb4286ca0667cedf6b57df217.tar.gz
CMake-71a033616a748d1bb4286ca0667cedf6b57df217.tar.bz2
added CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION variable
Fixes: #17955
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index fcea48b..839c7d3 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -481,10 +481,17 @@ void cmVisualStudio10TargetGenerator::Generate()
projLabel = this->Name.c_str();
}
e1.Element("ProjectName", projLabel);
- if (const char* targetFrameworkVersion =
- this->GeneratorTarget->GetProperty(
- "VS_DOTNET_TARGET_FRAMEWORK_VERSION")) {
- e1.Element("TargetFrameworkVersion", targetFrameworkVersion);
+ {
+ // TODO: add deprecation warning for VS_* property?
+ const char* targetFrameworkVersion = this->GeneratorTarget->GetProperty(
+ "VS_DOTNET_TARGET_FRAMEWORK_VERSION");
+ if (!targetFrameworkVersion) {
+ targetFrameworkVersion = this->GeneratorTarget->GetProperty(
+ "DOTNET_TARGET_FRAMEWORK_VERSION");
+ }
+ if (targetFrameworkVersion) {
+ e1.Element("TargetFrameworkVersion", targetFrameworkVersion);
+ }
}
// Disable the project upgrade prompt that is displayed the first time a