[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 42/282: CMake: support specifying the target Windows version
From: |
gnunet |
Subject: |
[gnurl] 42/282: CMake: support specifying the target Windows version |
Date: |
Wed, 01 Apr 2020 14:28:27 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 295ea5f641cb3d6ca44bb949e63bd1070835a872
Author: Marcel Raad <address@hidden>
AuthorDate: Tue Jan 14 20:28:20 2020 +0100
CMake: support specifying the target Windows version
Previously, it was only possible to set it to Windows Vista or XP by
setting the option `ENABLE_INET_PTON` to `ON` resp. `OFF`.
Use a new cache variable `CURL_TARGET_WINDOWS_VERSION` to be able to
explicitly set the target Windows version. `ENABLE_INET_PTON` is
ignored in this case.
Ref: https://github.com/curl/curl/pull/1639#issuecomment-313039352
Ref: https://github.com/curl/curl/pull/4607#issuecomment-557541456
Closes https://github.com/curl/curl/pull/4815
---
CMakeLists.txt | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 649db52a6..432837c5a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -79,6 +79,16 @@ option(ENABLE_ARES "Set to ON to enable c-ares support" OFF)
if(WIN32)
option(CURL_STATIC_CRT "Set to ON to build libcurl with static CRT on
Windows (/MT)." OFF)
option(ENABLE_INET_PTON "Set to OFF to prevent usage of inet_pton when
building against modern SDKs while still requiring compatibility with older
Windows versions, such as Windows XP, Windows Server 2003 etc." ON)
+ 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})
+ elseif(ENABLE_INET_PTON)
+ # _WIN32_WINNT_VISTA (0x0600)
+ add_definitions(-D_WIN32_WINNT=0x0600)
+ else()
+ # _WIN32_WINNT_WINXP (0x0501)
+ add_definitions(-D_WIN32_WINNT=0x0501)
+ endif()
endif()
option(CURL_LTO "Turn on compiler Link Time Optimizations" OFF)
@@ -858,16 +868,6 @@ elseif(HAVE_LIBSOCKET)
set(CMAKE_REQUIRED_LIBRARIES socket)
endif()
-if(WIN32)
- if(ENABLE_INET_PTON)
- # _WIN32_WINNT_VISTA (0x0600)
- add_definitions(-D_WIN32_WINNT=0x0600)
- else()
- # _WIN32_WINNT_WINXP (0x0501)
- add_definitions(-D_WIN32_WINNT=0x0501)
- endif()
-endif()
-
check_symbol_exists(basename "${CURL_INCLUDES}" HAVE_BASENAME)
check_symbol_exists(socket "${CURL_INCLUDES}" HAVE_SOCKET)
check_symbol_exists(select "${CURL_INCLUDES}" HAVE_SELECT)
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 23/282: curl: remove 'config' field from OutStruct, (continued)
- [gnurl] 23/282: curl: remove 'config' field from OutStruct, gnunet, 2020/04/01
- [gnurl] 13/282: hostip: move code to resolve IP address literals to `Curl_resolv`, gnunet, 2020/04/01
- [gnurl] 11/282: test1167: verify global symbols in public headers are curl prefixed, gnunet, 2020/04/01
- [gnurl] 25/282: curl: make #0 not output the full URL, gnunet, 2020/04/01
- [gnurl] 26/282: ConnectionExists: respect the max_concurrent_streams limits, gnunet, 2020/04/01
- [gnurl] 30/282: schannel_verify: Fix alt names manual verify for UNICODE builds, gnunet, 2020/04/01
- [gnurl] 31/282: CMake: use check_symbol_exists also for inet_pton, gnunet, 2020/04/01
- [gnurl] 39/282: ROADMAP: thread-safe `curl_global_init()`, gnunet, 2020/04/01
- [gnurl] 27/282: RELEASE-NOTES: synced, gnunet, 2020/04/01
- [gnurl] 33/282: wolfssh: set the password correctly for PASSWORD auth, gnunet, 2020/04/01
- [gnurl] 42/282: CMake: support specifying the target Windows version,
gnunet <=
- [gnurl] 35/282: libssh2: fix variable type, gnunet, 2020/04/01
- [gnurl] 24/282: wolfSSH: new SSH backend, gnunet, 2020/04/01
- [gnurl] 45/282: http: move "oauth_bearer" from connectdata to Curl_easy, gnunet, 2020/04/01
- [gnurl] 40/282: HTTP: increase EXPECT_100_THRESHOLD to 1Mb, gnunet, 2020/04/01
- [gnurl] 32/282: wolfssh: remove fprintf() calls (and uses of __func__), gnunet, 2020/04/01
- [gnurl] 46/282: copyright: fix year ranges, gnunet, 2020/04/01
- [gnurl] 34/282: curl:progressbarinit: ignore column width from terminals < 20, gnunet, 2020/04/01
- [gnurl] 29/282: HTTP-COOKIES.md: describe the cookie file format, gnunet, 2020/04/01
- [gnurl] 51/282: openssl: make CURLINFO_CERTINFO not truncate x509v3 fields, gnunet, 2020/04/01
- [gnurl] 60/282: curl: make the -# spaceship bar not wrap the line, gnunet, 2020/04/01