mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
Meta+WebContent+LibWeb: Add, link and initialize SDL3
This commit is contained in:
parent
36d5e814ef
commit
50dcd8fc85
Notes:
github-actions[bot]
2025-09-01 19:12:03 +00:00
Author: https://github.com/Lubrsi
Commit: 50dcd8fc85
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5902
Reviewed-by: https://github.com/gmta
Reviewed-by: https://github.com/trflynn89
6 changed files with 49 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
include(libweb_generators)
|
include(libweb_generators)
|
||||||
include(vulkan)
|
include(vulkan)
|
||||||
include(skia)
|
include(skia)
|
||||||
|
include(SDL3)
|
||||||
|
|
||||||
find_package(unofficial-angle CONFIG)
|
find_package(unofficial-angle CONFIG)
|
||||||
if(unofficial-angle_FOUND)
|
if(unofficial-angle_FOUND)
|
||||||
|
|
@ -1084,7 +1085,7 @@ set(GENERATED_SOURCES
|
||||||
|
|
||||||
ladybird_lib(LibWeb web EXPLICIT_SYMBOL_EXPORT)
|
ladybird_lib(LibWeb web EXPLICIT_SYMBOL_EXPORT)
|
||||||
|
|
||||||
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})
|
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} SDL3::SDL3)
|
||||||
|
|
||||||
# FIXME: https://github.com/microsoft/vcpkg/issues/42324
|
# FIXME: https://github.com/microsoft/vcpkg/issues/42324
|
||||||
target_include_directories(LibWeb PRIVATE ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include)
|
target_include_directories(LibWeb PRIVATE ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include)
|
||||||
|
|
|
||||||
3
Meta/CMake/SDL3.cmake
Normal file
3
Meta/CMake/SDL3.cmake
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
include_guard()
|
||||||
|
|
||||||
|
find_package(SDL3 CONFIG REQUIRED)
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
"command": "Ladybird",
|
"command": "Ladybird",
|
||||||
"finish-args": [
|
"finish-args": [
|
||||||
"--device=dri",
|
"--device=dri",
|
||||||
|
"--device=input",
|
||||||
"--share=ipc",
|
"--share=ipc",
|
||||||
"--share=network",
|
"--share=network",
|
||||||
"--socket=wayland",
|
"--socket=wayland",
|
||||||
|
|
@ -506,6 +507,22 @@
|
||||||
"-DFASTFLOAT_INSTALL=ON"
|
"-DFASTFLOAT_INSTALL=ON"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "sdl3",
|
||||||
|
"buildsystem": "cmake-ninja",
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/libsdl-org/SDL.git",
|
||||||
|
"tag": "release-3.2.20"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"config-opts": [
|
||||||
|
"-DCMAKE_BUILD_TYPE=Release",
|
||||||
|
"-DCMAKE_PREFIX_PATH=/app",
|
||||||
|
"-DCMAKE_INSTALL_LIBDIR=lib"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Ladybird",
|
"name": "Ladybird",
|
||||||
"buildsystem": "cmake-ninja",
|
"buildsystem": "cmake-ninja",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
include(audio)
|
include(audio)
|
||||||
|
include(SDL3)
|
||||||
|
|
||||||
set(SOURCES
|
set(SOURCES
|
||||||
ConnectionFromClient.cpp
|
ConnectionFromClient.cpp
|
||||||
|
|
@ -31,6 +32,7 @@ target_include_directories(webcontentservice PUBLIC $<BUILD_INTERFACE:${LADYBIRD
|
||||||
|
|
||||||
target_link_libraries(webcontentservice PUBLIC LibCore LibCrypto LibFileSystem LibGfx LibIPC LibJS LibMain LibMedia LibWeb LibWebSocket LibRequests LibWebView LibImageDecoderClient LibGC)
|
target_link_libraries(webcontentservice PUBLIC LibCore LibCrypto LibFileSystem LibGfx LibIPC LibJS LibMain LibMedia LibWeb LibWebSocket LibRequests LibWebView LibImageDecoderClient LibGC)
|
||||||
target_link_libraries(webcontentservice PRIVATE OpenSSL::Crypto OpenSSL::SSL)
|
target_link_libraries(webcontentservice PRIVATE OpenSSL::Crypto OpenSSL::SSL)
|
||||||
|
target_link_libraries(webcontentservice PRIVATE SDL3::SDL3)
|
||||||
|
|
||||||
if (ENABLE_QT AND NOT DEFINED LADYBIRD_AUDIO_BACKEND)
|
if (ENABLE_QT AND NOT DEFINED LADYBIRD_AUDIO_BACKEND)
|
||||||
find_package(Qt6 REQUIRED COMPONENTS Multimedia)
|
find_package(Qt6 REQUIRED COMPONENTS Multimedia)
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,8 @@
|
||||||
# include <LibCore/Platform/ProcessStatisticsMach.h>
|
# include <LibCore/Platform/ProcessStatisticsMach.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <SDL3/SDL_init.h>
|
||||||
|
|
||||||
static ErrorOr<void> load_content_filters(StringView config_path);
|
static ErrorOr<void> load_content_filters(StringView config_path);
|
||||||
|
|
||||||
static ErrorOr<void> initialize_resource_loader(GC::Heap&, int request_server_socket);
|
static ErrorOr<void> initialize_resource_loader(GC::Heap&, int request_server_socket);
|
||||||
|
|
@ -60,6 +62,12 @@ ErrorOr<int> ladybird_main(Main::Arguments arguments)
|
||||||
{
|
{
|
||||||
AK::set_rich_debug_enabled(true);
|
AK::set_rich_debug_enabled(true);
|
||||||
|
|
||||||
|
// SDL is used for the Gamepad API.
|
||||||
|
if (!SDL_Init(SDL_INIT_GAMEPAD)) {
|
||||||
|
dbgln("Failed to initialize SDL3: {}", SDL_GetError());
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(HAVE_QT_MULTIMEDIA)
|
#if defined(HAVE_QT_MULTIMEDIA)
|
||||||
QCoreApplication app(arguments.argc, arguments.argv);
|
QCoreApplication app(arguments.argc, arguments.argv);
|
||||||
|
|
||||||
|
|
|
||||||
17
vcpkg.json
17
vcpkg.json
|
|
@ -25,6 +25,11 @@
|
||||||
"zstd"
|
"zstd"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "dbus",
|
||||||
|
"default-features": false,
|
||||||
|
"platform": "linux"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "dirent",
|
"name": "dirent",
|
||||||
"platform": "windows"
|
"platform": "windows"
|
||||||
|
|
@ -151,6 +156,10 @@
|
||||||
"name": "pthread",
|
"name": "pthread",
|
||||||
"platform": "windows"
|
"platform": "windows"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "sdl3",
|
||||||
|
"default-features": false
|
||||||
|
},
|
||||||
"simdutf",
|
"simdutf",
|
||||||
{
|
{
|
||||||
"name": "skia",
|
"name": "skia",
|
||||||
|
|
@ -201,6 +210,10 @@
|
||||||
"name": "curl",
|
"name": "curl",
|
||||||
"version": "8.15.0#1"
|
"version": "8.15.0#1"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "dbus",
|
||||||
|
"version": "1.16.2#1"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "dirent",
|
"name": "dirent",
|
||||||
"version": "1.25#0"
|
"version": "1.25#0"
|
||||||
|
|
@ -269,6 +282,10 @@
|
||||||
"name": "qtmultimedia",
|
"name": "qtmultimedia",
|
||||||
"version": "6.8.3#0"
|
"version": "6.8.3#0"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "sdl3",
|
||||||
|
"version": "3.2.20#0"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "simdutf",
|
"name": "simdutf",
|
||||||
"version": "7.4.0#0"
|
"version": "7.4.0#0"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue