mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-12-28 03:14:41 +01:00
0acdd404e3
Due to an oversight in our CMakeLists, pkg-config would attempt to find *minizip* 3.0.0 (which doesn't exist) instead of *minizip-ng* 3.0.0, or at least it was on my Manjaro Linux machine. This has been fixed. The new submodule is using minizip-ng 3.0.4, the same version that was being used before.
69 lines
1.7 KiB
CMake
69 lines
1.7 KiB
CMake
project(minizip C)
|
|
|
|
add_library(minizip STATIC
|
|
minizip-ng/mz.h
|
|
minizip-ng/mz_compat.c
|
|
minizip-ng/mz_compat.h
|
|
minizip-ng/mz_crypt.c
|
|
minizip-ng/mz_crypt.h
|
|
minizip-ng/mz_os.c
|
|
minizip-ng/mz_os.h
|
|
minizip-ng/mz_strm.c
|
|
minizip-ng/mz_strm.h
|
|
minizip-ng/mz_strm_buf.c
|
|
minizip-ng/mz_strm_buf.h
|
|
minizip-ng/mz_strm_mem.c
|
|
minizip-ng/mz_strm_mem.h
|
|
minizip-ng/mz_strm_os.h
|
|
minizip-ng/mz_strm_split.c
|
|
minizip-ng/mz_strm_split.h
|
|
minizip-ng/mz_strm_zlib.c
|
|
minizip-ng/mz_strm_zlib.h
|
|
minizip-ng/mz_zip.c
|
|
minizip-ng/mz_zip.h
|
|
minizip-ng/mz_zip_rw.c
|
|
minizip-ng/mz_zip_rw.h
|
|
)
|
|
dolphin_disable_warnings(minizip)
|
|
|
|
if (UNIX)
|
|
target_sources(minizip PRIVATE
|
|
minizip-ng/mz_os_posix.c
|
|
minizip-ng/mz_strm_os_posix.c
|
|
)
|
|
endif()
|
|
|
|
if (WIN32)
|
|
target_sources(minizip PRIVATE
|
|
minizip-ng/mz_os_win32.c
|
|
minizip-ng/mz_strm_os_win32.c
|
|
)
|
|
endif()
|
|
|
|
target_include_directories(minizip PUBLIC minizip-ng)
|
|
|
|
target_compile_definitions(minizip PRIVATE HAVE_ZLIB ZLIB_COMPAT MZ_ZIP_NO_CRYPTO MZ_ZIP_NO_ENCRYPTION)
|
|
if (UNIX)
|
|
target_compile_definitions(minizip PRIVATE _POSIX_C_SOURCE=200112L)
|
|
target_compile_definitions(minizip PRIVATE __USE_LARGEFILE64 _LARGEFILE64_SOURCE)
|
|
endif()
|
|
|
|
check_include_file(stdint.h HAVE_STDINT_H)
|
|
if (HAVE_STDINT_H)
|
|
target_compile_definitions(minizip PRIVATE HAVE_STDINT_H)
|
|
endif()
|
|
|
|
check_include_file(inttypes.h HAVE_INTTYPES_H)
|
|
if (HAVE_INTTYPES_H)
|
|
target_compile_definitions(minizip PRIVATE HAVE_INTTYPES_H)
|
|
endif()
|
|
|
|
check_function_exists(fseeko HAVE_FSEEKO)
|
|
if (NOT HAVE_FSEEKO)
|
|
target_compile_definitions(minizip PRIVATE NO_FSEEKO)
|
|
endif()
|
|
|
|
target_link_libraries(minizip PUBLIC ZLIB::ZLIB)
|
|
|
|
add_library(minizip::minizip ALIAS minizip)
|