summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmcurl')
-rw-r--r--Utilities/cmcurl/CMakeLists.txt17
-rw-r--r--Utilities/cmcurl/lib/content_encoding.c2
-rw-r--r--Utilities/cmcurl/lib/version.c2
3 files changed, 5 insertions, 16 deletions
diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
index b8cf412..9b468c3 100644
--- a/Utilities/cmcurl/CMakeLists.txt
+++ b/Utilities/cmcurl/CMakeLists.txt
@@ -852,11 +852,11 @@ endif()
# Check for symbol dlopen (same as HAVE_LIBDL)
check_library_exists("${CURL_LIBS}" dlopen "" HAVE_DLOPEN)
-if(0) # This code not needed for building within CMake.
set(HAVE_LIBZ OFF)
set(HAVE_ZLIB_H OFF)
set(USE_ZLIB OFF)
-optional_dependency(ZLIB)
+#optional_dependency(ZLIB)
+find_package(ZLIB)
if(ZLIB_FOUND)
set(HAVE_ZLIB_H ON)
set(HAVE_LIBZ ON)
@@ -870,19 +870,8 @@ if(ZLIB_FOUND)
else()
list(APPEND CURL_LIBS ${ZLIB_LIBRARIES})
include_directories(${ZLIB_INCLUDE_DIRS})
+ list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS})
endif()
- list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS})
-endif()
-endif()
-
-#-----------------------------------------------------------------------------
-# CMake-specific curl code.
-
-if(CURL_SPECIAL_LIBZ)
- set(CURL_LIBS ${CURL_LIBS} "${CURL_SPECIAL_LIBZ}")
- include_directories(${CURL_SPECIAL_LIBZ_INCLUDES})
- set(HAVE_LIBZ 0)
- set(HAVE_ZLIB_H 0)
endif()
option(CURL_BROTLI "Set to ON to enable building curl with brotli support." OFF)
diff --git a/Utilities/cmcurl/lib/content_encoding.c b/Utilities/cmcurl/lib/content_encoding.c
index c03637a..4c723c3 100644
--- a/Utilities/cmcurl/lib/content_encoding.c
+++ b/Utilities/cmcurl/lib/content_encoding.c
@@ -27,7 +27,7 @@
#include <stddef.h>
#ifdef HAVE_ZLIB_H
-#include <zlib.h>
+#include <cm3p/zlib.h>
#endif
#ifdef HAVE_BROTLI
diff --git a/Utilities/cmcurl/lib/version.c b/Utilities/cmcurl/lib/version.c
index e37253d..5e3e428 100644
--- a/Utilities/cmcurl/lib/version.c
+++ b/Utilities/cmcurl/lib/version.c
@@ -51,7 +51,7 @@
#endif
#ifdef HAVE_ZLIB_H
-#include <zlib.h>
+#include <cm3p/zlib.h>
#endif
#ifdef HAVE_BROTLI