Skip to content

Commit

Permalink
rename exports of minizip as minizip-ng has prior art
Browse files Browse the repository at this point in the history
rename exports of minizip as minizip-ng has prior art
  • Loading branch information
Vollstrecker authored Dec 15, 2024
2 parents cb47dd8 + c0a97e2 commit 0802457
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
24 changes: 16 additions & 8 deletions contrib/minizip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ if(MINIZIP_BUILD_SHARED)
add_library(libminizip SHARED
${LIBMINIZIP_SRCS}
${LIBMINIZIP_HDRS})
add_library(MINIZIP::MINIZIP ALIAS libminizip)
add_library(MINIZIP::minizip ALIAS libminizip)
target_include_directories(libminizip PUBLIC
$<BUILD_INTERFACE:${minizip_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
Expand All @@ -141,7 +141,7 @@ if(MINIZIP_BUILD_SHARED)
endif(NOT CYGWIN)

set_target_properties(libminizip PROPERTIES
EXPORT_NAME MINIZIP
EXPORT_NAME minizip
OUTPUT_NAME minizip
VERSIOM ${minizip_VERSION}
SOVERSION ${minizip_VERSION_MAJOR})
Expand All @@ -153,28 +153,32 @@ if(MINIZIP_BUILD_SHARED)
add_executable(minizip
${MINIZIP_SRCS}
${MINIZIP_HDRS})
set_target_properties(minizip PROPERTIES
EXPORT_NAME minizip_executable)
target_compile_definitions(minizip
PRIVATE
$<$<BOOL:${MSVC}>:_CRT_SECURE_NO_WARNINGS>
$<$<BOOL:NOT:${HAVE_FOPEN64}>:USE_FILE32API=1>)
target_link_libraries(minizip PRIVATE MINIZIP::MINIZIP)
target_link_libraries(minizip PRIVATE MINIZIP::minizip)

add_executable(miniunzip
${MINIUNZIP_SRCS}
${MINIUNZIP_HDRS})
set_target_properties(miniunzip PROPERTIES
EXPORT_NAME miniunzip_executable)
target_compile_definitions(miniunzip
PRIVATE
$<$<BOOL:${MSVC}>:_CRT_SECURE_NO_WARNINGS>
$<$<BOOL:NOT:${HAVE_FOPEN64}>:USE_FILE32API=1>)
target_link_libraries(miniunzip PRIVATE MINIZIP::MINIZIP)
target_link_libraries(miniunzip PRIVATE MINIZIP::minizip)
endif(MINIZIP_BUILD_SHARED)

if(MINIZIP_BUILD_STATIC)

add_library(libminizipstatic STATIC
${LIBMINIZIP_SRCS}
${LIBMINIZIP_HDRS})
add_library(MINIZIP::MINIZIPSTATIC ALIAS libminizipstatic)
add_library(MINIZIP::minizipstatic ALIAS libminizipstatic)
target_include_directories(libminizipstatic PUBLIC
$<BUILD_INTERFACE:${minizip_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
Expand All @@ -188,7 +192,7 @@ if(MINIZIP_BUILD_STATIC)
PUBLIC
$<$<BOOL:${HAVE_OFF64_T}>:_LARGEFILE64_SOURCE=1>)
set_target_properties(libminizipstatic PROPERTIES
EXPORT_NAME MINIZIPSTATIC
EXPORT_NAME minizipstatic
OUTPUT_NAME minizip${minizip_static_suffix})

if(CYGWIN)
Expand All @@ -204,20 +208,24 @@ if(MINIZIP_BUILD_STATIC)
add_executable(minizipstatic
${MINIZIP_SRCS}
${MINIZIP_HDRS})
set_target_properties(minizipstatic PROPERTIES
EXPORT_NAME minizip_static_executable)
target_compile_definitions(minizipstatic
PRIVATE
$<$<BOOL:${MSVC}>:_CRT_SECURE_NO_WARNINGS>
$<$<BOOL:NOT:${HAVE_FOPEN64}>:USE_FILE32API=1>)
target_link_libraries(minizipstatic PRIVATE MINIZIP::MINIZIPSTATIC)
target_link_libraries(minizipstatic PRIVATE MINIZIP::minizipstatic)

add_executable(miniunzipstatic
${MINIUNZIP_SRCS}
${MINIUNZIP_HDRS})
set_target_properties(miniunzipstatic PROPERTIES
EXPORT_NAME miniunzip_static_executable)
target_compile_definitions(miniunzipstatic
PRIVATE
$<$<BOOL:${MSVC}>:_CRT_SECURE_NO_WARNINGS>
$<$<BOOL:NOT:${HAVE_FOPEN64}>:USE_FILE32API=1>)
target_link_libraries(miniunzipstatic PRIVATE MINIZIP::MINIZIPSTATIC)
target_link_libraries(miniunzipstatic PRIVATE MINIZIP::minizipstatic)
endif(MINIZIP_BUILD_STATIC)

if(MINIZIP_INSTALL)
Expand Down
5 changes: 3 additions & 2 deletions contrib/minizip/minizipConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
set(minizip_VERSION @minizip_VERSION@)
set(MINIZIP_ENABLE_BZIP2 @MINIZIP_ENABLE_BZIP2@
set(MINIZIP_ENABLE_BZIP2 @MINIZIP_ENABLE_BZIP2@)
@PACKAGE_INIT@
INCLUDE (${CMAKE_CURRENT_LIST_DIR}/minizip.cmake)
include(CMakeFindDependencyMacro)
find_dependency(zlib)
INCLUDE (${CMAKE_CURRENT_LIST_DIR}/minizip.cmake)

0 comments on commit 0802457

Please sign in to comment.