From 2201d706c2ffc3c0bad34509adcbc92c8382f633 Mon Sep 17 00:00:00 2001 From: Emil Ljungdahl Date: Mon, 12 Dec 2022 16:12:35 +0100 Subject: [PATCH] Explicitly state minimum Windows version --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d63ae71a..aa2ec92b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,6 +69,13 @@ IF(MSVC) add_definitions(-D_CRT_SECURE_NO_WARNINGS) ENDIF(MSVC) +IF(WIN32) + # Explicitly state minimum Windows version to compile against + # This affects which APIs that are available in for example winsock + # 0x0601 == Windows 7 + add_definitions(-D_WIN32_WINNT=0x0601) +ENDIF(WIN32) + SET(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libs") if (BUILD_SHARED_LIBS) add_definitions(-DBUILD_SHARED_LIBS)