Skip to content

Commit

Permalink
Support minizip-ng build (#574)
Browse files Browse the repository at this point in the history
* Add include to zlib.h as it uses the structures defined in the zlib.h

Up until now, the minizip was including this header file, but minizip-ng
does not and it causing the build to fail.
If the file uses structures defined in the zlib.h it should explicitly
include it.

* Support minizip version 3 and 4 as well

minizip-ng versions are 3 and 4, so support it in CMakeList as well

* Fix install deps in Fedora Github action
  • Loading branch information
ljavorsk authored Jan 26, 2024
1 parent aa3b9a1 commit 6d60da4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
- name: Install Deps
run: |
dnf install -y --setopt=install_weak_deps=False \
git gcc-c++ cmake rpm-build xml-security-c-devel zlib-devel vim-common doxygen boost-test swig python3-devel java-1.8.0-openjdk-devel xsd
git gcc-c++ cmake rpm-build xml-security-c-devel zlib-devel vim-common doxygen boost-test swig python3-devel java-1.8.0-openjdk-devel xsd minizip-devel
- name: Install CMake
if: matrix.container == 'fedora:39'
run: |
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ find_package(ZLIB REQUIRED)
find_package(MiniZip 1 QUIET) # version range (0...<2.0.0) requires CMake>=3.19
if(UNIX AND NOT APPLE)
find_package(PkgConfig)
pkg_check_modules(MINIZIP minizip IMPORTED_TARGET minizip<2.0.0)
pkg_check_modules(MINIZIP minizip IMPORTED_TARGET)
endif()
find_package(SWIG)
find_package(JNI)
Expand Down
1 change: 1 addition & 0 deletions src/util/ZipSerialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "DateTime.h"
#include "log.h"

#include <zlib.h>
#include <minizip/unzip.h>
#include <minizip/zip.h>
#ifdef _WIN32
Expand Down

0 comments on commit 6d60da4

Please sign in to comment.