2

tried to compile VTK using cmake on Windows 10 with Visual Studio compiler ... however, cmake says "Could not find an appropriate version of the Windows 10 SDK installed on this machine". Okay. So I Installed Windows 10 SDK but the same error keeps occuring.

Any idea what could be wrong? I've already reinstalled cmake but no success.

Thanks, Eric

user2651050
  • 73
  • 1
  • 1
  • 7

2 Answers2

0

you need to install windows sdk unless it wont work. cmake require windows sdk inorder to run cmake compiler. to install windows sdk,

  1. go to the visual studio installer from the start menu.
  2. select "modify" enter image description here
  3. select "individual components"
  4. in the coming up menu find the windows SDK (latest version) enter image description here
  5. then select modify.
Shehan Hasintha
  • 947
  • 10
  • 10
-2

I've have the same issue and in my case it's because the SDK I just installed is targeting 10.0.10586.0

ls "C:\Program Files (x86)\Windows Kits\10\include\"


    Directory: C:\Program Files (x86)\Windows Kits\10\include


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----        12/4/2015  12:27 AM                10.0.10586.0

But my system is detected by cmake as:

The system is: Windows - 10.0.10240 - AMD64

If you rename the include\10.0.10586.0 folder to include\10.0.10240, the SDK will be found.

Matt Aimonetti
  • 1,112
  • 1
  • 10
  • 11
  • My `C:\Program Files (x86)\Windows Kits\10\Include\` folder has: `10.0.10150.0/` and `10.0.10240.0/` and CMake reports: `The system is: Windows - 10.0.10240 - AMD64` The build numbers match (10240), but I still get `CMake Error at CMakeLists.txt:3 (project): Could not find an appropriate version of the Windows 10 SDK installed on this machine` Any ideas? – U007D Jan 20 '16 at 20:19
  • 2
    My bug was discovered and is believed to be resolved by CMake developers (https://cmake.org/Bug/view.php?id=15831), but it is not, at least in CMake v3.4.2 (the version I was using). :( Had to downgrade to CMake 3.3.2 and everything seems fine. – U007D Jan 20 '16 at 21:08
  • Had the same issue, and I installed the Windows 10 SDK from microsoft: https://dev.windows.com/en-us/downloads/windows-10-sdk, and cmake started working correctly. – CrHasher Jan 24 '16 at 19:18
  • 1
    how did you get this information "The system is: Windows ... ", what command or cmake variable produces this? – codeling Apr 14 '17 at 10:48
  • You should install the correct version of the SDK, not just rename a newer version to an older version, which could cause compilation failures due to header changes. – Mitch Lindgren Sep 16 '19 at 22:25