diff options
Diffstat (limited to 'cmake/modules')
-rw-r--r-- | cmake/modules/FindMinizip.cmake | 22 |
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) |