From fae4779864d1e5a93369b1ac7de9ee7428a28043 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 18 Dec 2015 14:35:34 -0500 Subject: [PATCH] Utilities/Release: Configure Windows binary to support Windows XP Compile with `-D_WIN32_WINNT=0x501` to use a WinXP-compatible API. Compile with `-D_USING_V110_SDK71_` to tell the VS standard library headers that we are building with a WinXP-compatible Windows SDK. Link executables with `-subsystem:console,5.01` to make them runnable on Windows XP. Ideally `cmake-gui` should instead be linked with `-subsystem:windows,5.01` but with the Ninja and Makefile generators CMake adds `-subsystem:windows` after our `-subsystem:console,5.01` flag and the linker seems to interpret this combination as we need. --- Utilities/Release/dash3win7_release.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Utilities/Release/dash3win7_release.cmake b/Utilities/Release/dash3win7_release.cmake index 290b4736b..f25d63897 100644 --- a/Utilities/Release/dash3win7_release.cmake +++ b/Utilities/Release/dash3win7_release.cmake @@ -17,7 +17,11 @@ CMAKE_GENERATOR:INTERNAL=Ninja BUILD_QtDialog:BOOL:=TRUE CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:BOOL=TRUE CMake_INSTALL_DEPENDENCIES:BOOL=ON +CMAKE_EXE_LINKER_FLAGS:STRING=-machine:x86 -subsystem:console,5.01 ") +set(ppflags "-D_WIN32_WINNT=0x501 -D_USING_V110_SDK71_") +set(CFLAGS "${ppflags}") +set(CXXFLAGS "${ppflags}") set(ENV ". ~/rel/env") get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) set(GIT_EXTRA "git config core.autocrlf true")