Previously the non targeted include_directories() was used, which had issue when using the png_static target in a submodule.
I came across this issue why trying to link sdl3_image with static vendored libs, which links against png_static.
For some reason png_shared exported the binary include path just fine, but png_static not, resulting in pnglibconf.h not being found.
So I cleaned up the cmake a little and explicitly added the include dirs to the targets directly.
Previously the non targeted
include_directories()
was used, which had issue when using thepng_static
target in a submodule.I came across this issue why trying to link
sdl3_image
with static vendored libs, which links against png_static. For some reasonpng_shared
exported the binary include path just fine, butpng_static
not, resulting inpnglibconf.h
not being found. So I cleaned up the cmake a little and explicitly added the include dirs to the targets directly.