mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 12:20:00 +01:00
Meta+WebContent+LibWeb: Add, link and initialize SDL3
This commit is contained in:
parent
36d5e814ef
commit
50dcd8fc85
|
|
@ -1,6 +1,7 @@
|
|||
include(libweb_generators)
|
||||
include(vulkan)
|
||||
include(skia)
|
||||
include(SDL3)
|
||||
|
||||
find_package(unofficial-angle CONFIG)
|
||||
if(unofficial-angle_FOUND)
|
||||
|
|
@ -1084,7 +1085,7 @@ set(GENERATED_SOURCES
|
|||
|
||||
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
|
||||
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",
|
||||
"finish-args": [
|
||||
"--device=dri",
|
||||
"--device=input",
|
||||
"--share=ipc",
|
||||
"--share=network",
|
||||
"--socket=wayland",
|
||||
|
|
@ -506,6 +507,22 @@
|
|||
"-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",
|
||||
"buildsystem": "cmake-ninja",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
include(audio)
|
||||
include(SDL3)
|
||||
|
||||
set(SOURCES
|
||||
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 PRIVATE OpenSSL::Crypto OpenSSL::SSL)
|
||||
target_link_libraries(webcontentservice PRIVATE SDL3::SDL3)
|
||||
|
||||
if (ENABLE_QT AND NOT DEFINED LADYBIRD_AUDIO_BACKEND)
|
||||
find_package(Qt6 REQUIRED COMPONENTS Multimedia)
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@
|
|||
# include <LibCore/Platform/ProcessStatisticsMach.h>
|
||||
#endif
|
||||
|
||||
#include <SDL3/SDL_init.h>
|
||||
|
||||
static ErrorOr<void> load_content_filters(StringView config_path);
|
||||
|
||||
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);
|
||||
|
||||
// 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)
|
||||
QCoreApplication app(arguments.argc, arguments.argv);
|
||||
|
||||
|
|
|
|||
17
vcpkg.json
17
vcpkg.json
|
|
@ -25,6 +25,11 @@
|
|||
"zstd"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "dbus",
|
||||
"default-features": false,
|
||||
"platform": "linux"
|
||||
},
|
||||
{
|
||||
"name": "dirent",
|
||||
"platform": "windows"
|
||||
|
|
@ -151,6 +156,10 @@
|
|||
"name": "pthread",
|
||||
"platform": "windows"
|
||||
},
|
||||
{
|
||||
"name": "sdl3",
|
||||
"default-features": false
|
||||
},
|
||||
"simdutf",
|
||||
{
|
||||
"name": "skia",
|
||||
|
|
@ -201,6 +210,10 @@
|
|||
"name": "curl",
|
||||
"version": "8.15.0#1"
|
||||
},
|
||||
{
|
||||
"name": "dbus",
|
||||
"version": "1.16.2#1"
|
||||
},
|
||||
{
|
||||
"name": "dirent",
|
||||
"version": "1.25#0"
|
||||
|
|
@ -269,6 +282,10 @@
|
|||
"name": "qtmultimedia",
|
||||
"version": "6.8.3#0"
|
||||
},
|
||||
{
|
||||
"name": "sdl3",
|
||||
"version": "3.2.20#0"
|
||||
},
|
||||
{
|
||||
"name": "simdutf",
|
||||
"version": "7.4.0#0"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user