summaryrefslogtreecommitdiff
path: root/Utilities/cmcurl
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-11-07 10:13:10 -0500
committerBrad King <brad.king@kitware.com>2014-11-10 10:13:38 -0500
commit4c3bd340804117c810c38273eee617911d475a36 (patch)
tree895c01f6746cb5b493c0bef97f9374c002b22bfd /Utilities/cmcurl
parent54cb23c657045c339a1a6060ea19d3a74a1c817b (diff)
downloadcmake-4c3bd340804117c810c38273eee617911d475a36.tar.gz
curl: Skip check for inet_pton on Windows
Re-apply part of the logic from commit v2.8.0~802 (ENH: allow for shared build of libcurl ..., 2009-04-10) to skip inet_pton on Windows. On versions of Windows prior to Vista the function is not available at runtime.
Diffstat (limited to 'Utilities/cmcurl')
-rw-r--r--Utilities/cmcurl/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
index 02acbd9351..71ebe9f78b 100644
--- a/Utilities/cmcurl/CMakeLists.txt
+++ b/Utilities/cmcurl/CMakeLists.txt
@@ -29,6 +29,13 @@ set(DISABLED_THREADSAFE OFF CACHE INTERNAL "Curl can use thread-safe functions")
set(ENABLE_IPV6 OFF CACHE INTERNAL "Curl IPv6 support")
set(HTTP_ONLY OFF CACHE INTERNAL "Curl is not http-only")
+# Windows Vista and above have inet_pton, but this will link on
+# older versions and then the executable will fail to launch at
+# runtime on older versions because no DLL provides the symbol.
+if(WIN32)
+ set(HAVE_INET_PTON 0 CACHE INTERNAL "Do not use inet_pton")
+endif()
+
#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |