My project requires Target Platform Version 10.0.20348.0 to build without error. Currently, I use the Retarget Solution in Visual Studio 2015 to change the Target Platform Version. I want to be able to build my project without having to use Retarget Solution every time I compile my CMakeLists.txt.
Below is my the first few lines of my CMakeLists.txt
CMAKE_MINIMUM_REQUIRED(VERSION VERSION 3.16)
SET(CMAKE_SYSTEM_VERSION 10.0.20348.0 CACHE TYPE INTERNAL FORCE)
PROJECT(MyProject)
message(STATUS "value: ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
The CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION always return 10.0.14393.0
My C:\Program Files (x86)\Windows Kits\10\Include contains:
10.0.10150.0
10.0.10240.0
10.0.10586.0
10.0.14393.0
10.0.20348.0
I’m unable to set CMAKE_SYSTEM_VERSION to 10.0.20348.0 but able to set it to the other versions. I tried -DCMAKE_SYSTEM_VERSION=10.0.20348.0 but was unsuccessful as well.
Thanks in advance for any help!