From 9df7eb2e1b257c8fd62c7f98272d48a89ab3c2ed Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Wed, 2 Jul 2025 21:30:34 -0600 Subject: [PATCH] LibWeb: Support linking custom-built ANGLE libraries not from vcpkg This is a similar approach to what we're using for skia. --- Libraries/LibWeb/CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Libraries/LibWeb/CMakeLists.txt b/Libraries/LibWeb/CMakeLists.txt index 8d9dfe8d492..e66e9eb8117 100644 --- a/Libraries/LibWeb/CMakeLists.txt +++ b/Libraries/LibWeb/CMakeLists.txt @@ -2,7 +2,14 @@ include(libweb_generators) include(vulkan) include(skia) -find_package(unofficial-angle REQUIRED CONFIG) +find_package(unofficial-angle CONFIG) +if(unofficial-angle_FOUND) + set(ANGLE_TARGETS unofficial::angle::libEGL unofficial::angle::libGLESv2) +else() + find_package(PkgConfig) + pkg_check_modules(angle REQUIRED IMPORTED_TARGET angle) + set(ANGLE_TARGETS PkgConfig::angle) +endif() set(SOURCES Animations/Animatable.cpp @@ -1003,7 +1010,7 @@ set(GENERATED_SOURCES ladybird_lib(LibWeb web) -target_link_libraries(LibWeb PRIVATE LibCore LibCompress LibCrypto LibJS LibHTTP LibGfx LibIPC LibRegex LibSyntax LibTextCodec LibUnicode LibMedia LibWasm LibXML LibIDL LibURL LibTLS LibRequests LibGC LibThreading skia unofficial::angle::libEGL unofficial::angle::libGLESv2) +target_link_libraries(LibWeb PRIVATE LibCore LibCompress LibCrypto LibJS LibHTTP LibGfx LibIPC LibRegex LibSyntax LibTextCodec LibUnicode LibMedia LibWasm LibXML LibIDL LibURL LibTLS LibRequests LibGC LibThreading skia ${ANGLE_TARGETS}) # FIXME: https://github.com/microsoft/vcpkg/issues/42324 target_include_directories(LibWeb PRIVATE ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include)