2022-05-19 01:51:26 -07:00
|
|
|
include(FetchContent)
|
|
|
|
|
|
|
|
FetchContent_Declare(zlib
|
|
|
|
GIT_REPOSITORY "https://github.com/madler/zlib"
|
2023-09-28 07:26:52 -07:00
|
|
|
GIT_TAG "v1.3"
|
2022-05-19 01:51:26 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
FetchContent_GetProperties(zlib)
|
|
|
|
if (NOT zlib_POPULATED)
|
|
|
|
FetchContent_Populate(zlib)
|
|
|
|
endif()
|
|
|
|
|
2023-01-28 21:56:03 -08:00
|
|
|
add_subdirectory("${zlib_SOURCE_DIR}" "${zlib_BINARY_DIR}" EXCLUDE_FROM_ALL)
|
2022-05-27 22:17:23 -07:00
|
|
|
|
2023-01-28 21:56:03 -08:00
|
|
|
set(ZLIB_LIBRARIES "zlibstatic" PARENT_SCOPE)
|
|
|
|
set(ZLIB_INCLUDE_DIRS "${zlib_SOURCE_DIR}" "${zlib_BINARY_DIR}" PARENT_SCOPE)
|