How to set MSVC Target Platform Version with CMake?

Viewed 8918

I'm searching for way to set Target Platform Version of MSVC project generated with CMake. I found the following ticket in CMake issue tracker which is now closed. I'm with latest 3.9.1 version of CMake. But the solution described there seems to not work. I tried

set (CMAKE_SYSTEM_VERSION 8.1)

in my CMakeLists.txt.

How to set Terget Platform Version when using CMake?

Afterwords:

Now I checked that setting CMAKE_SYSTEM_VERSION from command line when generating solution works but I want if possible to be able to set this from CMakeLists.txt file.

cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_SYSTEM_VERSION=8.1 ..\source\

At least it will be good to be able to set this from CMake GUI.

1 Answers
Related