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: #1639 (comment)
Ref: #4607 (comment)
@@ -79,6 +79,16 @@ option(ENABLE_ARES "Set to ON to enable c-ares support" OFF)
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")