mirror of
https://github.com/zlib-ng/minizip-ng
synced 2026-08-25 14:26:08 -04:00
Fix transitive finding of zlib-ng
This commit is contained in:
parent
def371aae4
commit
897a68aad8
3 changed files with 41 additions and 41 deletions
|
|
@ -173,17 +173,17 @@ endif()
|
|||
if(MZ_ZLIB)
|
||||
# Check if zlib is present
|
||||
if(NOT MZ_FORCE_FETCH_LIBS)
|
||||
find_package(ZLIBNG QUIET)
|
||||
find_package(ZLIB-NG QUIET)
|
||||
find_package(ZLIB QUIET)
|
||||
set(ZLIB_VERSION ${ZLIB_VERSION_STRING})
|
||||
endif()
|
||||
|
||||
if(ZLIBNG_FOUND AND NOT MZ_FORCE_FETCH_LIBS)
|
||||
message(STATUS "Using ZLIBNG")
|
||||
if(ZLIB-NG_FOUND AND NOT MZ_FORCE_FETCH_LIBS)
|
||||
message(STATUS "Using ZLIB-NG")
|
||||
|
||||
list(APPEND MINIZIP_INC ${ZLIBNG_INCLUDE_DIRS})
|
||||
list(APPEND MINIZIP_LIB ${ZLIBNG_LIBRARIES})
|
||||
list(APPEND MINIZIP_LBD ${ZLIBNG_LIBRARY_DIRS})
|
||||
list(APPEND MINIZIP_INC ${ZLIB-NG_INCLUDE_DIRS})
|
||||
list(APPEND MINIZIP_LIB ${ZLIB-NG_LIBRARIES})
|
||||
list(APPEND MINIZIP_LBD ${ZLIB-NG_LIBRARY_DIRS})
|
||||
|
||||
set(PC_PRIVATE_DEPS "zlib-ng")
|
||||
set(ZLIB_COMPAT OFF)
|
||||
|
|
@ -215,7 +215,7 @@ if(MZ_ZLIB)
|
|||
endif()
|
||||
|
||||
if(EXISTS "${ZLIB_BINARY_DIR}/zlib-ng.h")
|
||||
message(STATUS "ZLIB repository detected as ZLIBNG")
|
||||
message(STATUS "ZLIB repository detected as ZLIB-NG")
|
||||
set(ZLIB_COMPAT OFF)
|
||||
else()
|
||||
set(ZLIB_COMPAT ON)
|
||||
|
|
@ -231,8 +231,8 @@ if(MZ_ZLIB)
|
|||
if(ZLIB_COMPAT)
|
||||
list(APPEND MINIZIP_DEF -DZLIB_COMPAT)
|
||||
endif()
|
||||
if(ZLIBNG_FOUND OR NOT ZLIB_COMPAT)
|
||||
list(APPEND MINIZIP_DEP_PKG ZLIBNG)
|
||||
if(ZLIB-NG_FOUND OR NOT ZLIB_COMPAT)
|
||||
list(APPEND MINIZIP_DEP_PKG ZLIB-NG)
|
||||
elseif(ZLIB_FOUND)
|
||||
list(APPEND MINIZIP_DEP_PKG ZLIB)
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue