cmake: set SPNG_LIBRARY for pkgconfig as well

Pkgconfig will set SPNG_LIBRARIES but not SPNG_LIBRARY, this is an issue
as modules/imgcodecs/CmakeLists.txt uses SPNG_LIBRARY.

Bug: https://bugs.gentoo.org/955661
Fixes: c92815238e
Signed-off-by: Alfred Wingate <parona@protonmail.com>
This commit is contained in:
Alfred Wingate 2025-05-14 23:30:10 +03:00
parent 5d3a9788eb
commit 8fae4a65fe
No known key found for this signature in database
GPG Key ID: A12750536B5E7010

View File

@ -304,6 +304,9 @@ if(WITH_SPNG)
else()
if(PkgConfig_FOUND)
pkg_check_modules(SPNG QUIET spng)
if(SPNG_FOUND)
set(SPNG_LIBRARY ${SPNG_LIBRARIES} CACHE INTERNAL "")
endif()
endif()
endif()
if(SPNG_FOUND)