Skip to content

Fix zlib.h not found in src/pngimage.h #3208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 0.28.x
Choose a base branch
from

Conversation

TimmvonderMehden
Copy link

compiling exif2lib with EXV_HAVE_LIBZ fails at least on windows because the cmake does not set the include path for zlib

@TimmvonderMehden TimmvonderMehden changed the base branch from main to 0.28.x March 11, 2025 21:34
@neheb
Copy link
Collaborator

neheb commented Mar 12, 2025

NACK. This was fixed upstream. Backport 81bc63d with git cherry-pick -x.

ping @kmilos

@kmilos
Copy link
Collaborator

kmilos commented Mar 12, 2025

Wasn't this backported already?

@kmilos
Copy link
Collaborator

kmilos commented Mar 12, 2025

Wasn't this backported already?

Ah, not the same change @neheb

Note that this shouldn't really be necessary as the ZLIB::ZLIB IMPORTED target should also propagate its INTERFACE_INCLUDE_DIRECTORIES to exiv2lib:

https://gitlab.kitware.com/cmake/cmake/-/blob/4dc16577c5ccfba615ed2dfb36d3296c17da06e7/Modules/FindZLIB.cmake#L215-L216

So, better try to figure out why that is not happening instead of merging this straight away?

Btw, we do exactly the same for other IMPORTED targets (see CURL::libcurl, Iconv::Iconv, inih::inireader, inih::libinih), does it fail the same way for those? I think we would've heard about it by now...?

@kmilos kmilos added CMake Configuration issues related with CMake windows Windows Specific issues labels Mar 12, 2025
@kmilos
Copy link
Collaborator

kmilos commented Mar 12, 2025

Also note that our CI covers Windows builds (both shared and static), and there seems to be no problems compiling pngimage.cpp:

https://github.com/Exiv2/exiv2/actions/runs/13787654889/job/38559402541#step:8:387
https://github.com/Exiv2/exiv2/actions/runs/13787654889/job/38559403624#step:8:389

(Nor on any other platform...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake Configuration issues related with CMake windows Windows Specific issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants