1

I wanted to accomplish what other 2 threads are doing, but with latest MSVC to support targetting Windows XP and CMake support.

I keep following the advice given in How can I generate a Visual Studio 2012 project targeting Windows XP with CMake? and How does CMake specify "Platform Toolset" for a Visual Studio 2015 project? but CMake keeps telling me that it configured the source code for Windows 10.foo.bar SDK version which is not going to work. I tried hamfisting v141_xp into the project as CMAKE_GENERATOR_TOOLSET and -T parameter for cmake but it all ultimately fails. How can I accomplish this? And if possible, where can I specify this in CMakeSettings.json?

Bonus points for amd64 support, since the target system I want to make binaries for is Windows XP x64.

For what it's worth, I have tried to open a .sln file and I confirm that v141_xp is available as a platform toolset.

  • You said you tried something, but it failed... could you show us the error message? Steps to reproduce? – Alex Reinking May 26 '22 at 00:11
  • @AlexReinking I tried basically what I said in the answers. I should have left an explanation. I thought the solution is wrong, because CMake would still list Windows SDK 10 in the generation log instead of 7.1A. This can be ignored. I've compiled GZDoom 4.1.2 successfully this way and it works fine :) – Michael Dec May 26 '22 at 10:46

1 Answers1

2

I figured it out on my own. From x64 tools console:

  1. Prepare .sln files
cmake path/to/CMakeLists.txt -G "Visual Studio 15 2017 Win64" -A x64 -T v141_xp
  1. Build from .sln:
msbuild path/to/.sln /p:XPDeprecationWarning=false /p:Platform=x64