Set Windows SDK version in CMakePresets.json

Braden McDaniel 1 Reputation point
2022-08-22T01:23:36.257+00:00

Using Visual Studio's built-in CMake support, how does one specify the Windows SDK version that should be used (in CMakePresets.json)?

I'm trying to use the v140 toolchain; that is:

"toolset": {
"value": "v140",
"strategy": "external"
},

But Visual Studio wants to use the latest SDK installed (even though the last Windows 10 SDK that is supposed to work with the v140 toolchain is 14393).

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,674 questions
{count} votes