Fix ZLIB_LIBRARIES on macOS

This commit is contained in:
Luke Street 2021-06-11 22:24:50 -04:00
parent 064839bad6
commit 2aa5b76732
1 changed files with 2 additions and 1 deletions

View File

@ -1,7 +1,8 @@
if (APPLE) if (APPLE)
# use toolchain zlib # use toolchain zlib
find_package(ZLIB REQUIRED) find_package(ZLIB REQUIRED)
set(ZLIB_LIBRARIES ZLIB::ZLIB CACHE STRING "zlib libraries" FORCE) add_library(z ALIAS ZLIB::ZLIB) # alias hack to allow use from global context
set(ZLIB_LIBRARIES z CACHE STRING "zlib libraries" FORCE)
else() else()
if(NOT WIN32 AND NOT NX) # remove WIN32 when specter/freetype is gone if(NOT WIN32 AND NOT NX) # remove WIN32 when specter/freetype is gone
find_library(ZLIB_LIB NAMES zlib z) find_library(ZLIB_LIB NAMES zlib z)