Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
visla-dragon authored Feb 21, 2023
1 parent b76e546 commit 1ea0bcd
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -690,24 +690,30 @@ if(WIN32)
endif()
endif()

set(HAVE_LIBZ OFF)
set(USE_ZLIB OFF)
optional_dependency(ZLIB)
if(ZLIB_FOUND)
set(HAVE_LIBZ ON)
set(USE_ZLIB ON)

# Depend on ZLIB via imported targets if supported by the running
# version of CMake. This allows our dependents to get our dependencies
# transitively.
if(NOT CMAKE_VERSION VERSION_LESS 3.4)
list(APPEND CURL_LIBS ZLIB::ZLIB)
else()
list(APPEND CURL_LIBS ${ZLIB_LIBRARIES})
include_directories(${ZLIB_INCLUDE_DIRS})
endif()
list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS})
endif()
# set(HAVE_LIBZ OFF)
# set(USE_ZLIB OFF)
# optional_dependency(ZLIB)
# if(ZLIB_FOUND)
# set(HAVE_LIBZ ON)
# set(USE_ZLIB ON)

# # Depend on ZLIB via imported targets if supported by the running
# # version of CMake. This allows our dependents to get our dependencies
# # transitively.
# if(NOT CMAKE_VERSION VERSION_LESS 3.4)
# list(APPEND CURL_LIBS ZLIB::ZLIB)
# else()
# list(APPEND CURL_LIBS ${ZLIB_LIBRARIES})
# include_directories(${ZLIB_INCLUDE_DIRS})
# endif()
# list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS})
# endif()

set(HAVE_LIBZ ON)
set(USE_ZLIB ON)
list(APPEND CURL_LIBS ${ZLIB_LIBRARIES})
include_directories(${ZLIB_INCLUDE_DIRS})
list(APPEND CMAKE_REQUIRED_INCLUDES ${ZLIB_INCLUDE_DIRS})

option(CURL_BROTLI "Set to ON to enable building curl with brotli support." OFF)
set(HAVE_BROTLI OFF)
Expand Down

0 comments on commit 1ea0bcd

Please sign in to comment.