From 20bdd346968a66d4f61ee65c6a3b46b74809aa65 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Sat, 9 Nov 2024 09:59:26 -0500 Subject: [PATCH] WebContent: Move all WebContent configuration to Services --- Ladybird/CMakeLists.txt | 1 - Userland/Services/CMakeLists.txt | 1 + .../Services}/WebContent/CMakeLists.txt | 66 +++++++++---------- .../Services}/WebContent/main.cpp | 0 4 files changed, 33 insertions(+), 35 deletions(-) rename {Ladybird => Userland/Services}/WebContent/CMakeLists.txt (52%) rename {Ladybird => Userland/Services}/WebContent/main.cpp (100%) diff --git a/Ladybird/CMakeLists.txt b/Ladybird/CMakeLists.txt index edd7312d560..58fc0ec1369 100644 --- a/Ladybird/CMakeLists.txt +++ b/Ladybird/CMakeLists.txt @@ -132,7 +132,6 @@ else() endif() add_subdirectory(Headless) -add_subdirectory(WebContent) add_subdirectory(WebWorker) set(ladybird_helper_processes ImageDecoder RequestServer WebContent WebWorker) diff --git a/Userland/Services/CMakeLists.txt b/Userland/Services/CMakeLists.txt index a4766dcd15e..ae0646a0d99 100644 --- a/Userland/Services/CMakeLists.txt +++ b/Userland/Services/CMakeLists.txt @@ -1,3 +1,4 @@ add_subdirectory(ImageDecoder) add_subdirectory(RequestServer) +add_subdirectory(WebContent) add_subdirectory(WebDriver) diff --git a/Ladybird/WebContent/CMakeLists.txt b/Userland/Services/WebContent/CMakeLists.txt similarity index 52% rename from Ladybird/WebContent/CMakeLists.txt rename to Userland/Services/WebContent/CMakeLists.txt index 58c734ff38f..d21ddf0133e 100644 --- a/Ladybird/WebContent/CMakeLists.txt +++ b/Userland/Services/WebContent/CMakeLists.txt @@ -1,39 +1,37 @@ include(fontconfig) include(pulseaudio) -set(WEBCONTENT_SOURCE_DIR ${LADYBIRD_SOURCE_DIR}/Userland/Services/WebContent/) - -set(WEBCONTENT_SOURCES - ${WEBCONTENT_SOURCE_DIR}/ConnectionFromClient.cpp - ${WEBCONTENT_SOURCE_DIR}/ConsoleGlobalEnvironmentExtensions.cpp - ${WEBCONTENT_SOURCE_DIR}/BackingStoreManager.cpp - ${WEBCONTENT_SOURCE_DIR}/PageClient.cpp - ${WEBCONTENT_SOURCE_DIR}/PageHost.cpp - ${WEBCONTENT_SOURCE_DIR}/WebContentConsoleClient.cpp - ${WEBCONTENT_SOURCE_DIR}/WebDriverConnection.cpp - ../FontPlugin.cpp - ../HelperProcess.cpp - ../ImageCodecPlugin.cpp - ../Utilities.cpp +set(SOURCES + ${LADYBIRD_SOURCE_DIR}/Ladybird/FontPlugin.cpp + ${LADYBIRD_SOURCE_DIR}/Ladybird/HelperProcess.cpp + ${LADYBIRD_SOURCE_DIR}/Ladybird/ImageCodecPlugin.cpp + ${LADYBIRD_SOURCE_DIR}/Ladybird/Utilities.cpp + ConnectionFromClient.cpp + ConsoleGlobalEnvironmentExtensions.cpp + BackingStoreManager.cpp + PageClient.cpp + PageHost.cpp + WebContentConsoleClient.cpp + WebDriverConnection.cpp ) if (ANDROID) add_library(webcontentservice SHARED - ${WEBCONTENT_SOURCES} - ../Android/src/main/cpp/WebContentService.cpp - ../Android/src/main/cpp/WebContentServiceJNI.cpp - ../Android/src/main/cpp/LadybirdServiceBaseJNI.cpp - ../Android/src/main/cpp/JNIHelpers.cpp + ${LADYBIRD_SOURCE_DIR}/Ladybird/Android/src/main/cpp/WebContentService.cpp + ${LADYBIRD_SOURCE_DIR}/Ladybird/Android/src/main/cpp/WebContentServiceJNI.cpp + ${LADYBIRD_SOURCE_DIR}/Ladybird/Android/src/main/cpp/LadybirdServiceBaseJNI.cpp + ${LADYBIRD_SOURCE_DIR}/Ladybird/Android/src/main/cpp/JNIHelpers.cpp + ${SOURCES} ) target_link_libraries(webcontentservice PRIVATE android) else() - add_library(webcontentservice STATIC ${WEBCONTENT_SOURCES}) + add_library(webcontentservice STATIC ${SOURCES}) set_target_properties(webcontentservice PROPERTIES AUTOMOC OFF AUTORCC OFF AUTOUIC OFF) endif() +target_include_directories(webcontentservice PUBLIC $) target_include_directories(webcontentservice PUBLIC $) target_include_directories(webcontentservice PUBLIC $) -target_include_directories(webcontentservice PUBLIC $) target_link_libraries(webcontentservice PUBLIC LibCore LibFileSystem LibGfx LibIPC LibJS LibMain LibMedia LibWeb LibWebSocket LibRequests LibWebView LibImageDecoderClient) @@ -43,9 +41,9 @@ endif() if (ENABLE_QT) qt_add_executable(WebContent - ../Qt/EventLoopImplementationQt.cpp - ../Qt/EventLoopImplementationQtEventTarget.cpp - ../Qt/StringUtils.cpp + ${LADYBIRD_SOURCE_DIR}/Ladybird/Qt/EventLoopImplementationQt.cpp + ${LADYBIRD_SOURCE_DIR}/Ladybird/Qt/EventLoopImplementationQtEventTarget.cpp + ${LADYBIRD_SOURCE_DIR}/Ladybird/Qt/StringUtils.cpp main.cpp ) target_link_libraries(WebContent PRIVATE Qt::Core) @@ -55,8 +53,8 @@ if (ENABLE_QT) find_package(Qt6 REQUIRED COMPONENTS Multimedia) target_sources(WebContent PRIVATE - ../Qt/AudioCodecPluginQt.cpp - ../Qt/AudioThread.cpp + ${LADYBIRD_SOURCE_DIR}/Ladybird/Qt/AudioCodecPluginQt.cpp + ${LADYBIRD_SOURCE_DIR}/Ladybird/Qt/AudioThread.cpp ) target_link_libraries(WebContent PRIVATE Qt::Multimedia) @@ -70,15 +68,15 @@ target_link_libraries(WebContent PRIVATE webcontentservice LibURL) target_sources(webcontentservice PUBLIC FILE_SET ladybird TYPE HEADERS BASE_DIRS ${LADYBIRD_SOURCE_DIR} - FILES ../FontPlugin.h - ../ImageCodecPlugin.h + FILES ${LADYBIRD_SOURCE_DIR}/Ladybird/FontPlugin.h + ${LADYBIRD_SOURCE_DIR}/Ladybird/ImageCodecPlugin.h ) target_sources(webcontentservice PUBLIC FILE_SET server TYPE HEADERS BASE_DIRS ${LADYBIRD_SOURCE_DIR}/Userland/Services - FILES ${WEBCONTENT_SOURCE_DIR}/ConnectionFromClient.h - ${WEBCONTENT_SOURCE_DIR}/ConsoleGlobalEnvironmentExtensions.h - ${WEBCONTENT_SOURCE_DIR}/Forward.h - ${WEBCONTENT_SOURCE_DIR}/PageHost.h - ${WEBCONTENT_SOURCE_DIR}/WebContentConsoleClient.h - ${WEBCONTENT_SOURCE_DIR}/WebDriverConnection.h + FILES ConnectionFromClient.h + ConsoleGlobalEnvironmentExtensions.h + Forward.h + PageHost.h + WebContentConsoleClient.h + WebDriverConnection.h ) diff --git a/Ladybird/WebContent/main.cpp b/Userland/Services/WebContent/main.cpp similarity index 100% rename from Ladybird/WebContent/main.cpp rename to Userland/Services/WebContent/main.cpp