mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
CMake: Always use a target for linking skia
This commit is contained in:
parent
e782947a03
commit
f27d638e0a
Notes:
github-actions[bot]
2024-08-27 23:23:29 +00:00
Author: https://github.com/ADKaster Commit: https://github.com/LadybirdBrowser/ladybird/commit/f27d638e0ab Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1200
3 changed files with 11 additions and 8 deletions
|
@ -1,6 +1,8 @@
|
|||
include_guard()
|
||||
|
||||
find_package(unofficial-skia CONFIG)
|
||||
if(unofficial-skia_FOUND)
|
||||
set(SKIA_LIBRARIES unofficial::skia::skia)
|
||||
set(SKIA_TARGET unofficial::skia::skia)
|
||||
else()
|
||||
find_package(PkgConfig)
|
||||
|
||||
|
@ -16,7 +18,8 @@ else()
|
|||
endif()
|
||||
endforeach()
|
||||
|
||||
pkg_check_modules(SKIA skia=${SKIA_REQUIRED_VERSION} REQUIRED)
|
||||
include_directories(${SKIA_INCLUDE_DIRS})
|
||||
link_directories(${SKIA_LIBRARY_DIRS})
|
||||
pkg_check_modules(skia skia=${SKIA_REQUIRED_VERSION} REQUIRED IMPORTED_TARGET skia)
|
||||
set(SKIA_TARGET PkgConfig::skia)
|
||||
endif()
|
||||
swizzle_target_properties_for_swift(${SKIA_TARGET})
|
||||
add_library(skia ALIAS ${SKIA_TARGET})
|
||||
|
|
|
@ -73,8 +73,7 @@ set(SOURCES
|
|||
|
||||
serenity_lib(LibGfx gfx)
|
||||
|
||||
find_package(harfbuzz REQUIRED)
|
||||
target_link_libraries(LibGfx PRIVATE LibCompress LibCore LibCrypto LibFileSystem LibRIFF LibTextCodec LibIPC LibUnicode LibURL ${SKIA_LIBRARIES} harfbuzz)
|
||||
target_link_libraries(LibGfx PRIVATE LibCompress LibCore LibCrypto LibFileSystem LibRIFF LibTextCodec LibIPC LibUnicode LibURL)
|
||||
|
||||
set(generated_sources TIFFMetadata.h TIFFTagHandler.cpp)
|
||||
list(TRANSFORM generated_sources PREPEND "ImageFormats/")
|
||||
|
@ -110,9 +109,10 @@ find_package(PNG REQUIRED)
|
|||
find_package(LIBAVIF REQUIRED)
|
||||
find_package(WebP REQUIRED)
|
||||
pkg_check_modules(Jxl REQUIRED IMPORTED_TARGET libjxl)
|
||||
find_package(harfbuzz REQUIRED)
|
||||
|
||||
target_link_libraries(LibGfx PRIVATE PkgConfig::WOFF2 JPEG::JPEG PkgConfig::Jxl PNG::PNG avif WebP::webp WebP::webpdecoder
|
||||
WebP::webpdemux WebP::libwebpmux)
|
||||
WebP::webpdemux WebP::libwebpmux skia harfbuzz)
|
||||
|
||||
if (ENABLE_SWIFT)
|
||||
generate_clang_module_map(LibGfx GENERATED_FILES ${generated_headers})
|
||||
|
|
|
@ -786,7 +786,7 @@ set(GENERATED_SOURCES
|
|||
|
||||
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 LibRequests ${SKIA_LIBRARIES})
|
||||
target_link_libraries(LibWeb PRIVATE LibCore LibCrypto LibJS LibHTTP LibGfx LibIPC LibRegex LibSyntax LibTextCodec LibUnicode LibAudio LibMedia LibWasm LibXML LibIDL LibURL LibTLS LibRequests skia)
|
||||
|
||||
generate_js_bindings(LibWeb)
|
||||
|
||||
|
|
Loading…
Reference in a new issue