summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-04-03 14:56:47 (GMT)
committerBrad King <brad.king@kitware.com>2023-04-05 16:06:22 (GMT)
commitb512c53d43b6078c97e06231ccbfa8599a66a4f4 (patch)
treec751b6ede80ef913c3d2091d74f6ebce35589d4b /Source
parent2f3d945f8382fef4139c7d0c3879f6ff2f3756a0 (diff)
downloadCMake-b512c53d43b6078c97e06231ccbfa8599a66a4f4.zip
CMake-b512c53d43b6078c97e06231ccbfa8599a66a4f4.tar.gz
CMake-b512c53d43b6078c97e06231ccbfa8599a66a4f4.tar.bz2
VS: Add support for setting WindowsTargetPlatformVersion to 10.0
VS 2019 and above support this value to select a SDK version automatically. Fixes: #21403
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalVisualStudio14Generator.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx
index 9ae80bb..57082f4 100644
--- a/Source/cmGlobalVisualStudio14Generator.cxx
+++ b/Source/cmGlobalVisualStudio14Generator.cxx
@@ -355,6 +355,16 @@ std::string cmGlobalVisualStudio14Generator::GetWindows10SDKVersion(
cmMakefile* mf)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
+ // Accept specific version requests as-is.
+ if (this->GeneratorPlatformVersion) {
+ std::string const& ver = *this->GeneratorPlatformVersion;
+
+ // VS 2019 and above support specifying plain "10.0".
+ if (this->Version >= VSVersion::VS16 && ver == "10.0") {
+ return ver;
+ }
+ }
+
std::vector<std::string> win10Roots;
{