mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibGfx: Add a strict CMake check for the libpng apng patch
This commit is contained in:
parent
8f0dad0898
commit
17b7f192c4
|
|
@ -118,6 +118,20 @@ find_package(harfbuzz REQUIRED)
|
||||||
target_link_libraries(LibGfx PRIVATE PkgConfig::WOFF2 JPEG::JPEG PNG::PNG avif WebP::webp WebP::webpdecoder
|
target_link_libraries(LibGfx PRIVATE PkgConfig::WOFF2 JPEG::JPEG PNG::PNG avif WebP::webp WebP::webpdecoder
|
||||||
WebP::webpdemux WebP::libwebpmux skia harfbuzz)
|
WebP::webpdemux WebP::libwebpmux skia harfbuzz)
|
||||||
|
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES PNG::PNG)
|
||||||
|
check_c_source_compiles([=[
|
||||||
|
#include <png.h>
|
||||||
|
#if !defined(PNG_APNG_SUPPORTED) || !defined(PNG_READ_APNG_SUPPORTED) || !defined(PNG_READ_APNG_SUPPORTED)
|
||||||
|
#error "APNG support is required"
|
||||||
|
#endif
|
||||||
|
int main() {}
|
||||||
|
]=] LIBPNG_HAS_APNG)
|
||||||
|
unset(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
|
||||||
|
if (NOT LIBPNG_HAS_APNG)
|
||||||
|
message(FATAL_ERROR "libpng does not support APNG, which is required by LibGfx.")
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT ANDROID)
|
if (NOT ANDROID)
|
||||||
pkg_check_modules(Jxl REQUIRED IMPORTED_TARGET libjxl)
|
pkg_check_modules(Jxl REQUIRED IMPORTED_TARGET libjxl)
|
||||||
target_link_libraries(LibGfx PRIVATE PkgConfig::Jxl)
|
target_link_libraries(LibGfx PRIVATE PkgConfig::Jxl)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user