Skip to content

CMAKE: PNG fails on MinGW-w64 #683

@carlo-bramini

Description

@carlo-bramini

I tried to build SDL3_image-3.4.0 with MinGW-w64.
When configuring with CMake, this error message is printed on the console:

CMake Error at cmake/PrivateSdlFunctions.cmake:220 (message):
  PNG::PNG is not a shared library, but has type=INTERFACE_LIBRARY
Call Stack (most recent call first):
  CMakeLists.txt:906 (target_get_dynamic_library)

All my cross compilers for x86_64/i686/aarch64 show the same result.
The bug doesn't happen with version 3.2.6.
At the moment, I added the option -DSDLIMAGE_PNG_LIBPNG=OFF to CMake for bypassing the problem
However, I have not understood if this is an expected behaviour and this is the right solution for closing the issue.
I also tried to use libpng-1.6.47 and libpng-1.6.54 but it does not seem to be related to the version of the library.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions