소스 검색

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
Roger Leigh 8 년 전
부모
커밋
0a29a31161
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      Source/cmGlobalVisualStudio15Generator.cxx

+ 1 - 1
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;
 }