cmake: rename ZLIB in FetchContent

longterm goal is to override any subsequent find_package(ZLIB)
This commit is contained in:
Corentin Le Molgat
2024-10-16 10:40:03 +02:00
parent b8626a31f8
commit f2986d4393
2 changed files with 4 additions and 3 deletions

View File

@@ -62,11 +62,12 @@ if(BUILD_ZLIB)
list(APPEND CMAKE_MESSAGE_INDENT " ")
set(ZLIB_BUILD_EXAMPLES OFF)
FetchContent_Declare(
zlib
ZLIB
GIT_REPOSITORY "https://github.com/madler/ZLIB.git"
GIT_TAG "v1.3.1"
PATCH_COMMAND git apply --ignore-whitespace "${CMAKE_CURRENT_LIST_DIR}/../../patches/ZLIB.patch")
FetchContent_MakeAvailable(zlib)
PATCH_COMMAND git apply --ignore-whitespace
"${CMAKE_CURRENT_LIST_DIR}/../../patches/ZLIB-v1.3.1.patch")
FetchContent_MakeAvailable(ZLIB)
list(POP_BACK CMAKE_MESSAGE_INDENT)
message(CHECK_PASS "fetched")
endif()