2

I have vs 2017 and I can set Platform Toolset in IDE:

  • Visual Studio 2017 - Windows XP (v141_xp)
  • Visual Studio 2017 (v141)
  • Visual Studio 2015 (v140)
  • Visual Studio 2015 - Windows XP (v140_xp)

I want to cmake build many library(opencv,zlib...) ,and want to build two version:

  • one for xp(Visual Studio 2017 - Windows XP (v141_xp)),
  • one for windows 10(Visual Studio 2017 (v141))

of course I can cmake output *.sln and open sln ,set up Platform Toolset,build.... but I want to use cmake --build . automatic build

How can I appoint platform toolset for cmake?

fe263
  • 121
  • 1
  • 7
  • 4
    It is and it isn't a duplicate question. He asks both how to specify the SDK version (which isn't the compiler toolset) and he asks how to specify the toolset. Huh. – eric frazer Apr 22 '18 at 21:05
  • so, he agreed to close it. But there still isn't an answer of how to specify the SDK version... Which, again, isn't the compiler toolset. – eric frazer Aug 16 '18 at 04:36
  • 1
    For anyone finding this, the solution is to use CMAKE_SYSTEM_VERSION. eg. cmake -DCMAKE_SYSTEM_VERSION=8.1 . – evilrix Jun 12 '19 at 23:58

0 Answers0