Skip to content

Compatibility fixed for zlib and minizip#374

Merged
philippeVerney merged 2 commits into
F2I-Consulting:masterfrom
arnauddgbes:cmake/zlib-1.3.2-fix
May 7, 2026
Merged

Compatibility fixed for zlib and minizip#374
philippeVerney merged 2 commits into
F2I-Consulting:masterfrom
arnauddgbes:cmake/zlib-1.3.2-fix

Conversation

@arnauddgbes
Copy link
Copy Markdown
Contributor

@arnauddgbes arnauddgbes commented May 6, 2026

What does this implement/fix?

The library names for zlib and minizip have been modified in zlib 1.3.1.2 and the current 1.3.2 tags.

Hence adding "minizipsd" as possible static/debug name for minizip, and "minizips" as possible static/release name for minizip.

For ZLIB, this has been handled by the following patch in CMake 4.2.0:
Kitware/CMake@b2c059e
Including a copy of this module provides compatibility for configuring the project with older versions of cmake

Does this close any currently open issues?

Yes: #373

Any relevant logs, error output, etc?

Not required, obvious

Any other comments?

Several warnings are shown about missing PDB files for libminizip. These warnings are not new.

Where has this been tested?

Operating System: Windows 11

Platform: Microsoft Visual Studio 2022, CMake 3.30
Made a static build of zlib on Windows.
Compiling fesapi against it using cmake 3.30 and MSVC 2022. CMake project configuration OK (by setting ZLIB_ROOT and MINIZIP_ROOT)

Summary:
The library names for zlib and minizip have been modified in zlib 1.3.1.2
and the current 1.3.2 tags.

Hence adding "minizipsd" as possible static/debug name for minizip,
and "minizips" as possible static/release name for minizip.

For ZLIB, this has been handled by the following patch in CMake 4.2.0:
Kitware/CMake@b2c059e
Including a copy of this module provides compatibility for configuring the project with older versions of cmake

Test Plan:
Made a static build of zlib on Windows.
Compiling fesapi against it using cmake 3.30 and MSVC 2022.
CMake project configuration OK (by setting ZLIB_ROOT and MINIZIP_ROOT),
build ok, although several warnings are shown about missing PDB files for libminizip. These warnings are not new.
@philippeVerney philippeVerney added this to the v2.15.0.0 milestone May 7, 2026
@github-project-automation github-project-automation Bot moved this to To do in Build May 7, 2026
Integrate Minizip iowin32 files into code base as they are not installed by official minizip 1.3.2 cmake windows installer
Add a MINIZIP_USE_STATIC_LIBS cmake variable to allow to differentiate which kind of minizip library we want to link.
@philippeVerney
Copy link
Copy Markdown
Member

Hi @arnauddgbes
Thanks for this PR. I noticed the impossibility to build against zlib 1.3.2 but did not find time to work on yet...
I added another commit to your PR with the following goals :

  • to test and use your change with our windows CI
  • I saw that the v1.3.2 (and maybe other versions) cmake windows installer of minizip does not install the iowin32 files which we need for FESAPI. I then copied them into FESAPI in order to use them. Before this commit, we used our own minizip cmake file for windows which is not ideal.
  • I added a MINIZIP_USE_STATIC_LIBS cmake variable to differentiate which kind of minizip library we want to link.
  • The minimum required cmake version is now 3.29 cause of/thanks to the new zlib module which relies on CMP0159. I consequently had to install a newer version of cmake in our wheel builder environement (manylinux 2.28)

@philippeVerney philippeVerney merged commit c1c92d2 into F2I-Consulting:master May 7, 2026
11 checks passed
@github-project-automation github-project-automation Bot moved this from To do to Done in Build May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants