mirror of
https://github.com/zlib-ng/minizip-ng
synced 2026-08-25 14:26:08 -04:00
cmake: don't check ZLIB_COMPAT before it is set in MZ_FETCH_LIBS
This commit is contained in:
parent
597ee06152
commit
322c161a2f
1 changed files with 7 additions and 7 deletions
|
|
@ -226,19 +226,19 @@ if(MZ_ZLIB)
|
|||
list(APPEND MINIZIP_INC ${ZLIB_SOURCE_DIR})
|
||||
list(APPEND MINIZIP_INC ${ZLIB_BINARY_DIR})
|
||||
|
||||
# Have to add zlib to install targets
|
||||
if(ZLIB_COMPAT AND (NOT DEFINED BUILD_SHARED_LIBS OR NOT BUILD_SHARED_LIBS))
|
||||
list(APPEND MINIZIP_DEP zlibstatic)
|
||||
else()
|
||||
list(APPEND MINIZIP_DEP zlib)
|
||||
endif()
|
||||
|
||||
if(EXISTS "${ZLIB_BINARY_DIR}/zlib-ng.h")
|
||||
message(STATUS "ZLIB repository detected as ZLIB-NG")
|
||||
set(ZLIB_COMPAT OFF)
|
||||
else()
|
||||
set(ZLIB_COMPAT ON)
|
||||
endif()
|
||||
|
||||
# Have to add zlib to install targets
|
||||
if(ZLIB_COMPAT AND (NOT DEFINED BUILD_SHARED_LIBS OR NOT BUILD_SHARED_LIBS))
|
||||
list(APPEND MINIZIP_DEP zlibstatic)
|
||||
else()
|
||||
list(APPEND MINIZIP_DEP zlib)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "ZLIB library not found")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue