mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 21:37:58 +03:00
LibWeb: Allow using system skia
unofficial-skia is a vcpkg-specific package. With this change ladybird can be built against skia as provided by system package managers such as guix, mingw, and (soon) nix. All those packages include a .pc file, so we use pkg-config.
This commit is contained in:
parent
7da8a372df
commit
543b415b7d
Notes:
sideshowbarker
2024-07-16 21:34:08 +09:00
Author: https://github.com/fgaz 🔰 Commit: https://github.com/LadybirdBrowser/ladybird/commit/543b415b7d Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/382 Reviewed-by: https://github.com/ADKaster ✅
@ -754,11 +754,19 @@ set(GENERATED_SOURCES
|
|||||||
Worker/WebWorkerServerEndpoint.h
|
Worker/WebWorkerServerEndpoint.h
|
||||||
)
|
)
|
||||||
|
|
||||||
find_package(unofficial-skia CONFIG REQUIRED)
|
|
||||||
|
|
||||||
serenity_lib(LibWeb web)
|
serenity_lib(LibWeb web)
|
||||||
|
|
||||||
target_link_libraries(LibWeb PRIVATE LibCore LibCrypto LibJS LibHTTP LibGfx LibIPC LibRegex LibSyntax LibTextCodec LibUnicode LibAudio LibMedia LibWasm LibXML LibIDL LibURL LibTLS unofficial::skia::skia)
|
find_package(unofficial-skia CONFIG)
|
||||||
|
if(unofficial-skia_FOUND)
|
||||||
|
set(SKIA_LIBRARIES unofficial::skia::skia)
|
||||||
|
else()
|
||||||
|
find_package(PkgConfig)
|
||||||
|
pkg_check_modules(SKIA skia=124 REQUIRED)
|
||||||
|
target_include_directories(LibWeb PRIVATE ${SKIA_INCLUDE_DIRS})
|
||||||
|
target_link_directories(LibWeb PRIVATE ${SKIA_LIBRARY_DIRS})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_link_libraries(LibWeb PRIVATE LibCore LibCrypto LibJS LibHTTP LibGfx LibIPC LibRegex LibSyntax LibTextCodec LibUnicode LibAudio LibMedia LibWasm LibXML LibIDL LibURL LibTLS ${SKIA_LIBRARIES})
|
||||||
|
|
||||||
generate_js_bindings(LibWeb)
|
generate_js_bindings(LibWeb)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user