aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2023-11-10 11:59:32 -0800
committerGerald Combs <gerald@wireshark.org>2023-11-10 21:00:30 +0000
commita5e0be51df50e0e8a8f3091413aa036847282369 (patch)
treea5d0cf8db271ac36abf621c6ec77dbff2b242f68 /cmake/modules
parentcefcf0ac02352757a39bd3ab9defb4ec3e089819 (diff)
Windows: Upgrade Minizip to 1.3
Diffstat (limited to 'cmake/modules')
-rw-r--r--cmake/modules/FindMinizip.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/cmake/modules/FindMinizip.cmake b/cmake/modules/FindMinizip.cmake
index 9cfa28e581..b6d9c8673c 100644
--- a/cmake/modules/FindMinizip.cmake
+++ b/cmake/modules/FindMinizip.cmake
@@ -4,6 +4,8 @@
# MINIZIP_INCLUDE_DIRS - where to find minizip headers.
# MINIZIP_LIBRARIES - List of libraries when using minizip.
# MINIZIP_FOUND - True if minizip is found.
+# MINIZIP_DLL_DIR - (Windows) Path to the minizip DLL.
+# MINIZIP_DLL - (Windows) Name of the minizip DLL.
FindWSWinLibs( "minizip-*" "MINIZIP_HINTS" )
@@ -50,9 +52,29 @@ if(MINIZIP_FOUND)
# for renamed struct members to avoid an endless game of whack-a-mole.
include(CheckStructHasMember)
check_struct_has_member("zip_fileinfo" "dos_date" "minizip/zip.h" HAVE_MZCOMPAT_DOS_DATE)
+ if (WIN32)
+ set ( MINIZIP_DLL_DIR "${MINIZIP_HINTS}/bin"
+ CACHE PATH "Path to Minizip DLL"
+ )
+ file( GLOB _minizip_dll RELATIVE "${MINIZIP_DLL_DIR}"
+ "${MINIZIP_DLL_DIR}/minizip.dll"
+ )
+ set ( MINIZIP_DLL ${_minizip_dll}
+ CACHE FILEPATH "Minizip DLL file name"
+ )
+ file( GLOB _minizip_pdb RELATIVE "${MINIZIP_DLL_DIR}"
+ "${MINIZIP_DLL_DIR}/minizip.pdb"
+ )
+ set ( MINIZIP_PDB ${_minizip_pdb}
+ CACHE FILEPATH "Minizip PDB file name"
+ )
+ mark_as_advanced( MINIZIP_DLL_DIR MINIZIP_DLL MINIZIP_PDB )
+ endif()
else()
set(MINIZIP_LIBRARIES)
set(MINIZIP_INCLUDE_DIRS)
+ SET( MINIZIP_DLL_DIR )
+ SET( MINIZIP_DLL )
endif()
mark_as_advanced(MINIZIP_LIBRARIES MINIZIP_INCLUDE_DIRS)