Skip to content

Commit 1a4e2bd

Browse files
committed
Update zlib-ng and gtest to circumvent curl missing the zlib target
1 parent f7c053e commit 1a4e2bd

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

CMakeLists.txt

+2-3
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ else()
204204
# * from command line:
205205
# -DCURL_ZLIB=OFF
206206
# * from CMake script:
207-
# SET(CURL_ZLIB OFF CACHE STRING "" FORCE)
208207
if (CURL_ZLIB OR CURL_ZLIB STREQUAL AUTO OR NOT DEFINED CACHE{CURL_ZLIB})
209208
include(cmake/zlib_external.cmake)
210209
endif()
@@ -303,8 +302,8 @@ if(CPR_BUILD_TESTS)
303302
clear_variable(DESTINATION CMAKE_CXX_CLANG_TIDY BACKUP CMAKE_CXX_CLANG_TIDY_BKP)
304303

305304
FetchContent_Declare(googletest
306-
URL https://github.com/google/googletest/archive/release-1.11.0.tar.gz
307-
URL_HASH SHA256=b4870bf121ff7795ba20d20bcdd8627b8e088f2d1dab299a031c1034eddc93d5 # the file hash for release-1.11.0.tar.gz
305+
URL https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz
306+
URL_HASH SHA256=8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7 # the file hash for release-1.14.0.tar.gz
308307
USES_TERMINAL_DOWNLOAD TRUE) # <---- This is needed only for Ninja to show download progress
309308
FetchContent_MakeAvailable(googletest)
310309

cmake/zlib_external.cmake

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ set(ZLIB_ENABLE_TESTS OFF CACHE INTERNAL "" FORCE)
1010

1111
FetchContent_Declare(zlib
1212
GIT_REPOSITORY https://github.com/zlib-ng/zlib-ng
13-
GIT_TAG 2.0.6
13+
GIT_TAG 2.1.3
1414
USES_TERMINAL_DOWNLOAD TRUE)
1515
FetchContent_MakeAvailable(zlib)
1616

17-
add_library(ZLIB::ZLIB ALIAS zlib)
18-
1917
# Fix Windows zlib dll names from "zlibd1.dll" to "zlib.dll":
2018
if(WIN32 AND BUILD_SHARED_LIBS)
2119
set_target_properties(zlib PROPERTIES OUTPUT_NAME "zlib")

0 commit comments

Comments
 (0)