Skip to content

Commit cfd5285

Browse files
committed
zlib tmp
1 parent f79251a commit cfd5285

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,19 @@ if (WITH_SYSTEM_PROVIDED_3PARTY)
189189
find_package(utf8cpp REQUIRED)
190190
endif()
191191

192+
include(FetchContent)
193+
FetchContent_Declare(
194+
zlib
195+
GIT_REPOSITORY https://github.com/madler/zlib.git
196+
GIT_TAG v1.3.1
197+
FIND_PACKAGE_ARGS NAMES ZLIB
198+
)
199+
FetchContent_MakeAvailable(zlib)
200+
192201
find_package(ZLIB REQUIRED)
202+
if (TARGET zlib)
203+
add_library(ZLIB::ZLIB ALIAS zlib)
204+
endif()
193205

194206
# Include 3party dependencies.
195207
add_subdirectory(3party)

0 commit comments

Comments
 (0)