# SET(CMAKE\_SYSTEM\_VERSION) unsuccessful for 10.0.20348.0

**URL:** <https://discourse.cmake.org/t/set-cmake-system-version-unsuccessful-for-10-0-20348-0/3929>\
**Category:** Code\
**Tags:** os:windows\
**Created:** [August 13, 2021, 5:26am UTC](https://discourse.cmake.org/t/set-cmake-system-version-unsuccessful-for-10-0-20348-0/3929 "2021-08-13T05:26:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kvynlim](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/ec9cab/32.png) [@kvynlim](https://discourse.cmake.org/u/kvynlim)\
**Post date:** [August 13, 2021, 5:26am UTC](https://discourse.cmake.org/t/set-cmake-system-version-unsuccessful-for-10-0-20348-0/3929/1 "2021-08-13T05:26:08Z")

</div>

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

```auto
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!
