-
Notifications
You must be signed in to change notification settings - Fork 724
Open
Description
Hello libpng community!
Im trying to build 'zlib-ng' and 'libpng' as deps through FetchContent_Declare in cmake using mingw32-w64 compiler. Cmake easily fetches the libraries from github, but at the build time I getting this error.
# error The include path of <zlib.h> is incorrect
I checked both defines and found out that libpng sets them for different values
#define PNG_ZBUF_SIZE 8192
#define PNG_ZLIB_VERNUM 0x1310 // <---
#define PNG_Z_DEFAULT_COMPRESSION (-1)
against
#define ZLIB_VERSION "1.3.1.zlib-ng"
#define ZLIB_VERNUM 0x131f // <---
#define ZLIB_VER_MAJOR 1
Im using cmake version 3.31.4
Part of CMakeLists.txt:
FetchContent_Declare(
ZLIB
GIT_REPOSITORY https://github.com/zlib-ng/zlib-ng.git
GIT_TAG 2.2.4
OVERRIDE_FIND_PACKAGE
)
FetchContent_Declare(
PNG
GIT_REPOSITORY https://github.com/pnggroup/libpng.git
GIT_TAG v1.6.48
OVERRIDE_FIND_PACKAGE
)
What I possibly doing wrong? Could you point me to the right direction?
Metadata
Metadata
Assignees
Labels
No labels