Improved check for zlib's example and example64 project.

This commit is contained in:
Nathan Moinvaziri 2023-04-22 15:18:53 -07:00
parent c74bb95701
commit a4c6fd3100

View File

@ -771,9 +771,11 @@ if(MZ_BUILD_TESTS AND MZ_BUILD_UNIT_TESTS)
# Can't disable zlib testing so ctest tries to run zlib example app
if(MZ_ZLIB AND NOT MZ_LIBCOMP AND NOT ZLIB_FOUND)
target_include_directories(example PRIVATE ${ZLIB_SOURCE_DIR})
add_dependencies(${MINIZIP_TARGET} example)
if(HAVE_OFF64_T)
if(TARGET example)
target_include_directories(example PRIVATE ${ZLIB_SOURCE_DIR})
add_dependencies(${MINIZIP_TARGET} example)
endif()
if(TARGET example64)
target_include_directories(example64 PRIVATE ${ZLIB_SOURCE_DIR})
add_dependencies(${MINIZIP_TARGET} example64)
endif()