diff options
author | Roger Leigh <rleigh@dundee.ac.uk> | 2017-04-25 09:32:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-04-25 15:04:52 (GMT) |
commit | 0a29a311612eca698886d271e4137224a5a4d65a (patch) | |
tree | 8d4d2fd9f3245f0bd1c844e46ba43b37b10cb27a | |
parent | a6a0cfb24d637063bdb1c8e9e8ceb78cac3f90ac (diff) | |
download | CMake-0a29a311612eca698886d271e4137224a5a4d65a.zip CMake-0a29a311612eca698886d271e4137224a5a4d65a.tar.gz CMake-0a29a311612eca698886d271e4137224a5a4d65a.tar.bz2 |
VS2017: Verify Windows 8.1 SDK before using it
The detection logic added by commit v3.8.0-rc2~14^2 (VS2017: If Win 8.1
SDK is not available, use Win 10 SDK, 2017-02-20) was incomplete. It is
possible for the Win 8.1 SDK registry entry to exist, and even the
directory, but the header files to not actually be installed. Teach
`cmGlobalVisualStudio15Generator::IsWin81SDKInstalled` to verify that
the `windows.h` header actually exists in the SDK directory. We do this
in `cmGlobalVisualStudio14Generator::GetWindows10SDKVersion` for the
Windows 10 SDK already.
Fixes: #16811
-rw-r--r-- | Source/cmGlobalVisualStudio15Generator.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmGlobalVisualStudio15Generator.cxx b/Source/cmGlobalVisualStudio15Generator.cxx index 2312bc0..da2bf8c 100644 --- a/Source/cmGlobalVisualStudio15Generator.cxx +++ b/Source/cmGlobalVisualStudio15Generator.cxx @@ -164,7 +164,7 @@ bool cmGlobalVisualStudio15Generator::IsWin81SDKInstalled() const "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\" "Windows Kits\\Installed Roots;KitsRoot81", win81Root, cmSystemTools::KeyWOW64_32)) { - return true; + return cmSystemTools::FileExists(win81Root + "/um/windows.h", true); } return false; } |