diff --git a/Ladybird/CMakeLists.txt b/Ladybird/CMakeLists.txt index 58fc0ec1369..a2a45d6aea7 100644 --- a/Ladybird/CMakeLists.txt +++ b/Ladybird/CMakeLists.txt @@ -132,7 +132,6 @@ else() endif() add_subdirectory(Headless) -add_subdirectory(WebWorker) set(ladybird_helper_processes ImageDecoder RequestServer WebContent WebWorker) diff --git a/Userland/Services/CMakeLists.txt b/Userland/Services/CMakeLists.txt index ae0646a0d99..2b6f5844aa6 100644 --- a/Userland/Services/CMakeLists.txt +++ b/Userland/Services/CMakeLists.txt @@ -2,3 +2,4 @@ add_subdirectory(ImageDecoder) add_subdirectory(RequestServer) add_subdirectory(WebContent) add_subdirectory(WebDriver) +add_subdirectory(WebWorker) diff --git a/Ladybird/WebWorker/CMakeLists.txt b/Userland/Services/WebWorker/CMakeLists.txt similarity index 70% rename from Ladybird/WebWorker/CMakeLists.txt rename to Userland/Services/WebWorker/CMakeLists.txt index 3bba3a51b3e..9c9bc40504d 100644 --- a/Ladybird/WebWorker/CMakeLists.txt +++ b/Userland/Services/WebWorker/CMakeLists.txt @@ -1,14 +1,12 @@ include(fontconfig) -set(WEBWORKER_SOURCE_DIR ${LADYBIRD_SOURCE_DIR}/Userland/Services/WebWorker) - set(WEBWORKER_SOURCES - "${WEBWORKER_SOURCE_DIR}/ConnectionFromClient.cpp" - "${WEBWORKER_SOURCE_DIR}/DedicatedWorkerHost.cpp" - "${WEBWORKER_SOURCE_DIR}/PageHost.cpp" - ../FontPlugin.cpp - ../HelperProcess.cpp - ../Utilities.cpp + ${LADYBIRD_SOURCE_DIR}/Ladybird/FontPlugin.cpp + ${LADYBIRD_SOURCE_DIR}/Ladybird/HelperProcess.cpp + ${LADYBIRD_SOURCE_DIR}/Ladybird/Utilities.cpp + ConnectionFromClient.cpp + DedicatedWorkerHost.cpp + PageHost.cpp ) # FIXME: Add Android service @@ -16,9 +14,10 @@ set(WEBWORKER_SOURCES add_library(webworkerservice STATIC ${WEBWORKER_SOURCES}) set_target_properties(webworkerservice PROPERTIES AUTOMOC OFF AUTORCC OFF AUTOUIC OFF) +target_include_directories(webworkerservice PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/../..) target_include_directories(webworkerservice PRIVATE ${LADYBIRD_SOURCE_DIR}/Userland/Services/) target_include_directories(webworkerservice PRIVATE ${LADYBIRD_SOURCE_DIR}/Userland/) -target_include_directories(webworkerservice PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/..) + target_link_libraries(webworkerservice PUBLIC LibCore LibFileSystem LibGfx LibIPC LibJS LibRequests LibWeb LibWebView LibUnicode LibImageDecoderClient LibMain LibURL) if (HAS_FONTCONFIG) @@ -27,15 +26,14 @@ endif() if (ENABLE_QT) qt_add_executable(WebWorker - ../Qt/EventLoopImplementationQt.cpp - ../Qt/EventLoopImplementationQtEventTarget.cpp - ../Qt/StringUtils.cpp - main.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(WebWorker PRIVATE Qt::Core) target_link_libraries(WebWorker PRIVATE webworkerservice LibWebSocket) target_compile_definitions(WebWorker PRIVATE HAVE_QT=1) - else() add_executable(WebWorker main.cpp) endif() diff --git a/Ladybird/WebWorker/main.cpp b/Userland/Services/WebWorker/main.cpp similarity index 100% rename from Ladybird/WebWorker/main.cpp rename to Userland/Services/WebWorker/main.cpp