diff options
author | Brad King <brad.king@kitware.com> | 2023-08-08 18:20:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-08-10 13:57:00 (GMT) |
commit | ae97d82e830c6ddc81808e3f44dad8a47a30bcae (patch) | |
tree | 6eb5216786d3167c8ad111d3f0a71cd4b104716b /Source/cmGlobalVisualStudio14Generator.cxx | |
parent | 15ff89654b925b74f074ef7e13ed905c3ec38c4b (diff) | |
download | CMake-ae97d82e830c6ddc81808e3f44dad8a47a30bcae.zip CMake-ae97d82e830c6ddc81808e3f44dad8a47a30bcae.tar.gz CMake-ae97d82e830c6ddc81808e3f44dad8a47a30bcae.tar.bz2 |
VS: Teach CMAKE_GENERATOR_PLATFORM to support Windows 8.1 SDK selection
Honor an explicit `version=8.1` field value regardless of the Windows
target version.
Issue: #25170
Diffstat (limited to 'Source/cmGlobalVisualStudio14Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio14Generator.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx index 8e8062c..506a12a 100644 --- a/Source/cmGlobalVisualStudio14Generator.cxx +++ b/Source/cmGlobalVisualStudio14Generator.cxx @@ -167,6 +167,23 @@ bool cmGlobalVisualStudio14Generator::InitializePlatformWindows(cmMakefile* mf) return this->SelectWindows10SDK(mf); } + if (version == "8.1"_s) { + if (this->IsWin81SDKInstalled()) { + this->SetWindowsTargetPlatformVersion("8.1", mf); + return true; + } + /* clang-format off */ + mf->IssueMessage(MessageType::FATAL_ERROR, cmStrCat( + "Generator\n" + " ", this->GetName(), "\n" + "given platform specification containing a\n" + " version=8.1\n" + "field, but the Windows 8.1 SDK is not installed.\n" + )); + /* clang-format on */ + return false; + } + if (version.empty()) { /* clang-format off */ mf->IssueMessage(MessageType::FATAL_ERROR, cmStrCat( |