Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2022-09-11 16:49:16 +0300
committerSimon Tatham <anakin@pobox.com>2022-09-11 17:17:20 +0300
commitf8165649a1d2cef637853bfdfc8966912fbc77cf (patch)
tree8b800d503fde646f5b5296bd8da9e78fcf60917d /cmake/platforms
parent1489528a1fecbcd9b308d3df0fa02028bcd89595 (diff)
32-bit Windows x86: reinstate subsystem version of 5.01.
This went missing in the migration to CMake, and broke compatibility of the standard 32-bit builds with Windows XP. (Of course, the 'buildold' versions should still have run.) There doesn't seem to be a convenient CMake option to configure it cleanly, so I had to do a bodgy string-replace on the variable containing the linker flags, which I found by source-diving in CMake. That's fragile enough that I've also put in a check after the fact, so that we'll find out if it ever stops working.
Diffstat (limited to 'cmake/platforms')
-rw-r--r--cmake/platforms/windows.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/platforms/windows.cmake b/cmake/platforms/windows.cmake
index c4299b2c..a7ed7c7c 100644
--- a/cmake/platforms/windows.cmake
+++ b/cmake/platforms/windows.cmake
@@ -7,6 +7,15 @@ set(PUTTY_LINK_MAPS OFF
set(PUTTY_EMBEDDED_CHM_FILE ""
CACHE FILEPATH "Path to a .chm help file to embed in the binaries")
+if(PUTTY_SUBSYSTEM_VERSION)
+ string(REPLACE
+ "subsystem:windows" "subsystem:windows,${PUTTY_SUBSYSTEM_VERSION}"
+ CMAKE_C_CREATE_WIN32_EXE ${CMAKE_C_CREATE_WIN32_EXE})
+ string(REPLACE
+ "subsystem:console" "subsystem:console,${PUTTY_SUBSYSTEM_VERSION}"
+ CMAKE_C_CREATE_CONSOLE_EXE ${CMAKE_C_CREATE_CONSOLE_EXE})
+endif()
+
function(define_negation newvar oldvar)
if(${oldvar})
set(${newvar} OFF PARENT_SCOPE)