summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMatthias Naegler <matthias.naegler@auvesy.de>2020-07-08 14:14:53 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-07-12 18:02:51 +0200
commit4ef16f1f474787ac739717359c19885d1c6443d9 (patch)
tree4d52fad783a36eb3e7772799d8d1ea63e3932838 /CMakeLists.txt
parent0d4c3618e9ba0d62c82780f49dc52db3ac8f9e55 (diff)
downloadcurl-4ef16f1f474787ac739717359c19885d1c6443d9.tar.gz
cmake: fix windows xp build
Reviewed-by: Marcel Raad Closes #5662
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5a1333397..919cfcd24 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,12 +82,15 @@ if(WIN32)
set(CURL_TARGET_WINDOWS_VERSION "" CACHE STRING "Minimum target Windows version as hex string")
if(CURL_TARGET_WINDOWS_VERSION)
add_definitions(-D_WIN32_WINNT=${CURL_TARGET_WINDOWS_VERSION})
+ set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_WIN32_WINNT=${CURL_TARGET_WINDOWS_VERSION}")
elseif(ENABLE_INET_PTON)
# _WIN32_WINNT_VISTA (0x0600)
add_definitions(-D_WIN32_WINNT=0x0600)
+ set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_WIN32_WINNT=0x0600")
else()
# _WIN32_WINNT_WINXP (0x0501)
add_definitions(-D_WIN32_WINNT=0x0501)
+ set(CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_WIN32_WINNT=0x0501")
endif()
endif()
option(CURL_LTO "Turn on compiler Link Time Optimizations" OFF)