From be8a45bca012b9a462ab8eb0d1476a89e67ca2e4 Mon Sep 17 00:00:00 2001 From: andy5995 Date: Tue, 25 Sep 2018 13:26:03 -0500 Subject: [PATCH] cmake:use miniz if zlib isn't found --- source/shared_lib/CMakeLists.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/source/shared_lib/CMakeLists.txt b/source/shared_lib/CMakeLists.txt index d389d581e..8734efb0e 100644 --- a/source/shared_lib/CMakeLists.txt +++ b/source/shared_lib/CMakeLists.txt @@ -228,16 +228,17 @@ IF(BUILD_MODEL_VIEWER OR BUILD_MAP_EDITOR OR BUILD_ZETAGLEST) endif() endif() - ######################################################################################### - # zetaglest lib - + message(STATUS "Searching for zlib") include(FindZLIB) - IF (FORCE_EMBEDDED_LIBS) + IF (FORCE_EMBEDDED_LIBS OR NOT ZLIB_FOUND) SET(DIRS_WITH_SRC ${DIRS_WITH_SRC} + # miniz is a library included with the ZG distribution. Not as + # developed as zlib, but smaller, and uses the same function names + # so basically a replacement for miniz. We may one day replace + # miniz with the zlib sources miniz) ELSE() - message(STATUS "Searching for zlib") if (ZLIB_FOUND) message(STATUS "Using external zlib") SET(EXTERNAL_LIBS ${EXTERNAL_LIBS} ${ZLIB_LIBRARIES})