-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Externals: Update minizip to minizip-ng version 3.0.4.
- Loading branch information
1 parent
09a0ba0
commit 17b5a06
Showing
54 changed files
with
18,323 additions
and
2,802 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,73 @@ | ||
project(minizip C) | ||
|
||
set(SRCS ioapi.c unzip.c) | ||
|
||
add_definitions(-DNOUNCRYPT) | ||
if(UNIX) | ||
add_definitions(-D__USE_FILE_OFFSET64) | ||
add_definitions(-D__USE_LARGEFILE64) | ||
add_definitions(-D_LARGEFILE64_SOURCE) | ||
add_definitions(-D_FILE_OFFSET_BIT=64) | ||
add_library(minizip STATIC | ||
mz.h | ||
mz_compat.c | ||
mz_compat.h | ||
mz_crypt.c | ||
mz_crypt.h | ||
mz_os.c | ||
mz_os.h | ||
mz_strm.c | ||
mz_strm.h | ||
mz_strm_buf.c | ||
mz_strm_buf.h | ||
mz_strm_mem.c | ||
mz_strm_mem.h | ||
mz_strm_os.h | ||
mz_strm_split.c | ||
mz_strm_split.h | ||
mz_strm_zlib.c | ||
mz_strm_zlib.h | ||
mz_zip.c | ||
mz_zip.h | ||
mz_zip_rw.c | ||
mz_zip_rw.h | ||
unzip.h | ||
zip.h | ||
) | ||
|
||
if (UNIX) | ||
target_sources(minizip PRIVATE | ||
mz_os_posix.c | ||
mz_strm_os_posix.c | ||
) | ||
endif() | ||
|
||
if (WIN32) | ||
target_sources(minizip PRIVATE | ||
mz_os_win32.c | ||
mz_strm_os_win32.c | ||
) | ||
endif() | ||
|
||
add_library(minizip STATIC ${SRCS}) | ||
target_include_directories(minizip PUBLIC .) | ||
|
||
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) | ||
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_type_size(off64_t OFF64_T) | ||
if (HAVE_OFF64_T) | ||
target_compile_definitions(minizip PRIVATE __USE_LARGEFILE64 _LARGEFILE64_SOURCE) | ||
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) |
Oops, something went wrong.