Meta: Patch angle vcpkg to build on Linux

This involves removing x11 dependencies, and not setting angle_use_x11.
This commit is contained in:
Andrew Kaster 2025-06-24 17:18:25 -06:00 committed by Andrew Kaster
commit 435aee2b1e
Notes: github-actions[bot] 2025-06-30 14:02:29 +00:00
8 changed files with 9 additions and 33 deletions

View file

@ -2,7 +2,7 @@ include(libweb_generators)
include(vulkan) include(vulkan)
include(skia) include(skia)
if (APPLE) if (APPLE OR LINUX)
find_package(unofficial-angle REQUIRED CONFIG) find_package(unofficial-angle REQUIRED CONFIG)
endif() endif()
@ -1016,7 +1016,7 @@ serenity_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) 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)
if (APPLE) if (APPLE OR LINUX)
target_link_libraries(LibWeb PRIVATE unofficial::angle::libEGL unofficial::angle::libGLESv2) target_link_libraries(LibWeb PRIVATE unofficial::angle::libEGL unofficial::angle::libGLESv2)
else() else()
target_link_libraries(LibWeb PRIVATE GL) target_link_libraries(LibWeb PRIVATE GL)

View file

@ -106,9 +106,6 @@ elseif (WIN32)
set(angle_enable_d3d11 TRUE) set(angle_enable_d3d11 TRUE)
elseif (UNIX) elseif (UNIX)
set(is_linux TRUE) set(is_linux TRUE)
if(LINUX)
set(angle_use_x11 TRUE)
endif()
endif () endif ()
# VCPKG EDIT: end vcpkg modified block # VCPKG EDIT: end vcpkg modified block
@ -384,16 +381,6 @@ add_library(ANGLE::ANGLE ALIAS ANGLEFramework)
#### VCPKG EDIT: #### VCPKG EDIT:
#### various vcpkg additions and install commands #### various vcpkg additions and install commands
# X11 support
if (angle_use_x11)
find_package(X11 COMPONENTS Xext Xi REQUIRED)
target_include_directories(ANGLE PRIVATE ${X11_INCLUDE_DIR})
target_sources(ANGLE PRIVATE ${libangle_gpu_info_util_x11_sources})
target_sources(ANGLE PRIVATE "src/gpu_info_util/SystemInfo_x11.cpp")
target_compile_definitions(ANGLE PRIVATE ANGLE_USE_X11 GPU_INFO_USE_X11)
target_link_libraries(ANGLE PRIVATE ${X11_LIBRARIES} X11::X11 X11::Xi X11::Xext)
endif()
# set export names of some targets to match prior vcpkg port buildsystem # set export names of some targets to match prior vcpkg port buildsystem
if(TARGET EGL) if(TARGET EGL)
set_target_properties(EGL PROPERTIES EXPORT_NAME libEGL) set_target_properties(EGL PROPERTIES EXPORT_NAME libEGL)

View file

@ -8,7 +8,7 @@ endif ()
if (USE_ANGLE_EGL OR ENABLE_WEBGL) if (USE_ANGLE_EGL OR ENABLE_WEBGL)
list(APPEND ANGLE_SOURCES list(APPEND ANGLE_SOURCES
${_gl_backend_sources} ${gl_backend_sources}
${angle_system_utils_sources_linux} ${angle_system_utils_sources_linux}
${angle_system_utils_sources_posix} ${angle_system_utils_sources_posix}

View file

@ -52,7 +52,7 @@ if(USE_OPENGL)
if(USE_ANGLE_EGL OR ENABLE_WEBGL) if(USE_ANGLE_EGL OR ENABLE_WEBGL)
list(APPEND ANGLE_SOURCES list(APPEND ANGLE_SOURCES
${_gl_backend_sources} ${gl_backend_sources}
${libangle_gl_egl_dl_sources} ${libangle_gl_egl_dl_sources}
${libangle_gl_egl_sources} ${libangle_gl_egl_sources}

View file

@ -1,6 +1,6 @@
if (VCPKG_TARGET_IS_LINUX) if (VCPKG_TARGET_IS_LINUX)
message(WARNING "Building with a gcc version less than 6.1 is not supported.") message(WARNING "Building with a gcc version less than 6.1 is not supported.")
message(WARNING "${PORT} currently requires the following libraries from the system package manager:\n libx11-dev\n mesa-common-dev\n libxi-dev\n libxext-dev\n\nThese can be installed on Ubuntu systems via apt-get install libx11-dev mesa-common-dev libxi-dev libxext-dev.") message(WARNING "${PORT} currently requires the following libraries from the system package manager:\n mesa-common-dev\n\nThese can be installed on Ubuntu systems via apt-get install mesa-common-dev.")
endif() endif()
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")

View file

@ -1,7 +1,4 @@
include(CMakeFindDependencyMacro) include(CMakeFindDependencyMacro)
find_dependency(ZLIB) find_dependency(ZLIB)
if(UNIX AND NOT APPLE)
find_dependency(X11 COMPONENTS Xext Xi)
endif()
include("${CMAKE_CURRENT_LIST_DIR}/unofficial-angle-targets.cmake") include("${CMAKE_CURRENT_LIST_DIR}/unofficial-angle-targets.cmake")

View file

@ -10,18 +10,6 @@
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"dependencies": [ "dependencies": [
"egl-registry", "egl-registry",
{
"name": "libx11",
"platform": "linux"
},
{
"name": "libxext",
"platform": "linux"
},
{
"name": "libxi",
"platform": "linux"
},
"opengl-registry", "opengl-registry",
{ {
"name": "vcpkg-cmake", "name": "vcpkg-cmake",

View file

@ -8,6 +8,10 @@
"metal" "metal"
] ]
}, },
{
"name": "angle",
"platform": "linux"
},
{ {
"name": "curl", "name": "curl",
"features": [ "features": [