CMake: Fix build with downstream minizip that exports incompatible symbols

This commit is contained in:
Vicki Pfau 2020-11-04 18:27:53 -08:00
parent 01e73bc15f
commit d2af8b83e0
2 changed files with 7 additions and 0 deletions

View File

@ -45,6 +45,7 @@ Emulation fixes:
Other fixes:
- 3DS: Fix thread cleanup
- All: Improve export headers (fixes mgba.io/i/1738)
- CMake: Fix build with downstream minizip that exports incompatible symbols
- Core: Ensure ELF regions can be written before trying
- Debugger: Don't skip undefined instructions when debugger attached
- FFmpeg: Fix some small memory leaks

View File

@ -664,6 +664,12 @@ elseif(USE_MINIZIP)
list(APPEND FEATURES MINIZIP)
list(APPEND VFS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/util/vfs/vfs-zip.c)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS},libminizip1")
set(CMAKE_REQUIRED_LIBRARIES ${MINIZIP_LIBRARIES})
check_function_exists(unztell64 HAVE_UNZTELL64)
unset(CMAKE_REQUIRED_LIBRARIES)
if(NOT HAVE_UNZTELL64)
add_definitions(-Dunztell64=unzTell64) # Bug in downstream minizip that some distros use
endif()
elseif(USE_ZLIB)
list(APPEND VFS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/util/vfs/vfs-zip.c
${CMAKE_CURRENT_SOURCE_DIR}/src/third-party/zlib/contrib/minizip/ioapi.c