1
0
mirror of https://github.com/luanti-org/minetestmapper.git synced 2025-10-09 15:05:23 +02:00

Support zlib-ng

this provides a 60% speed improvement on an older map I have
This commit is contained in:
sfan5
2025-03-05 20:40:19 +01:00
parent 4ba09ec532
commit 8b1a143cda
3 changed files with 26 additions and 6 deletions

View File

@@ -57,7 +57,16 @@ endif(NOT LIBGD_LIBRARY OR NOT LIBGD_INCLUDE_DIR)
# Libraries: zlib
find_package(ZLIB REQUIRED)
find_package(zlib-ng QUIET)
if(zlib-ng_FOUND)
set(ZLIB_INCLUDE_DIR zlib-ng::zlib)
set(ZLIB_LIBRARY zlib-ng::zlib)
set(USE_ZLIB_NG TRUE)
message(STATUS "Found zlib-ng, using it instead of zlib.")
else()
find_package(ZLIB REQUIRED)
set(USE_ZLIB_NG FALSE)
endif()
# Libraries: zstd