minecraft-pi-docker/dependencies/zlib/CMakeLists.txt

25 lines
524 B
CMake
Raw Normal View History

2021-06-17 21:32:24 +00:00
project(zlib)
include(FetchContent)
# Silence Warnings
add_compile_options(-w)
## zlib
# Download
FetchContent_Declare(
zlib
GIT_REPOSITORY "https://github.com/madler/zlib.git"
GIT_TAG "v1.2.11"
)
FetchContent_Populate(zlib)
include_directories("${zlib_SOURCE_DIR}" "${zlib_BINARY_DIR}") # Fix ZLib Build
2021-10-12 20:13:11 +00:00
add_subdirectory("${zlib_SOURCE_DIR}" "${zlib_BINARY_DIR}" EXCLUDE_FROM_ALL)
2021-06-17 21:32:24 +00:00
2021-10-22 21:28:26 +00:00
# Ensure Build
2021-10-22 22:36:09 +00:00
add_custom_target(zlib-build ALL DEPENDS zlib)
2021-06-17 21:32:24 +00:00
# Install
install(TARGETS zlib DESTINATION "${MCPI_LIB_DIR}")