We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19c18b4 commit 5768d3aCopy full SHA for 5768d3a
CMakeLists.txt
@@ -583,6 +583,7 @@ endif()
583
584
set(HAVE_LIBZ OFF)
585
set(USE_ZLIB OFF)
586
+hunter_add_package(ZLIB)
587
optional_dependency(ZLIB)
588
if(ZLIB_FOUND)
589
set(HAVE_LIBZ ON)
@@ -591,7 +592,10 @@ if(ZLIB_FOUND)
591
592
# Depend on ZLIB via imported targets if supported by the running
593
# version of CMake. This allows our dependents to get our dependencies
594
# transitively.
- if(NOT CMAKE_VERSION VERSION_LESS 3.4)
595
+ if(HUNTER_ENABLED)
596
+ list(APPEND CURL_LIBS ZLIB::zlib)
597
+ set(ZLIB_INCLUDE_DIRS "${ZLIB_ROOT}/include")
598
+ elseif(NOT CMAKE_VERSION VERSION_LESS 3.4)
599
list(APPEND CURL_LIBS ZLIB::ZLIB)
600
else()
601
list(APPEND CURL_LIBS ${ZLIB_LIBRARIES})
0 commit comments