mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-09 19:16:02 +00:00
LibGfx: Add a strict CMake check for the libpng apng patch
This commit is contained in:
parent
8f0dad0898
commit
17b7f192c4
Notes:
github-actions[bot]
2025-05-30 21:22:20 +00:00
Author: https://github.com/ADKaster
Commit: 17b7f192c4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4924
1 changed files with 14 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue