diff --git a/CMakeLists.txt b/CMakeLists.txt index ff18120cee1..01ef8f42d86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,6 +89,7 @@ endif() include(CTest) # for BUILD_TESTING option, default ON if (ENABLE_GUI_TARGETS) + add_subdirectory(Userland/Services) add_subdirectory(Ladybird) endif() diff --git a/Ladybird/CMakeLists.txt b/Ladybird/CMakeLists.txt index aa29c54bdc7..dbe0fcc4746 100644 --- a/Ladybird/CMakeLists.txt +++ b/Ladybird/CMakeLists.txt @@ -135,7 +135,6 @@ add_subdirectory(Headless) add_subdirectory(ImageDecoder) add_subdirectory(RequestServer) add_subdirectory(WebContent) -add_subdirectory(WebDriver) add_subdirectory(WebWorker) set(ladybird_helper_processes ImageDecoder RequestServer WebContent WebWorker) diff --git a/Userland/Services/CMakeLists.txt b/Userland/Services/CMakeLists.txt new file mode 100644 index 00000000000..55a151f2f08 --- /dev/null +++ b/Userland/Services/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(WebDriver) diff --git a/Ladybird/WebDriver/CMakeLists.txt b/Userland/Services/WebDriver/CMakeLists.txt similarity index 61% rename from Ladybird/WebDriver/CMakeLists.txt rename to Userland/Services/WebDriver/CMakeLists.txt index 35579c38ff8..849c81c06e7 100644 --- a/Ladybird/WebDriver/CMakeLists.txt +++ b/Userland/Services/WebDriver/CMakeLists.txt @@ -1,18 +1,16 @@ -set(WEBDRIVER_SOURCE_DIR ${LADYBIRD_SOURCE_DIR}/Userland/Services/WebDriver) - set(SOURCES - ${WEBDRIVER_SOURCE_DIR}/Client.cpp - ${WEBDRIVER_SOURCE_DIR}/Session.cpp - ${WEBDRIVER_SOURCE_DIR}/WebContentConnection.cpp - ../Utilities.cpp + ${LADYBIRD_SOURCE_DIR}/Ladybird/Utilities.cpp + Client.cpp + Session.cpp + WebContentConnection.cpp main.cpp ) add_executable(WebDriver ${SOURCES}) -target_include_directories(WebDriver PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/..) -target_include_directories(WebDriver PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/..) +target_include_directories(WebDriver PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../..) +target_include_directories(WebDriver PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/../..) target_include_directories(WebDriver PRIVATE ${LADYBIRD_SOURCE_DIR}/Userland) target_include_directories(WebDriver PRIVATE ${LADYBIRD_SOURCE_DIR}/Userland/Services) + target_link_libraries(WebDriver PRIVATE LibCore LibFileSystem LibGfx LibIPC LibJS LibMain LibWeb LibWebSocket LibWebView) -add_dependencies(WebDriver headless-browser) diff --git a/Ladybird/WebDriver/main.cpp b/Userland/Services/WebDriver/main.cpp similarity index 98% rename from Ladybird/WebDriver/main.cpp rename to Userland/Services/WebDriver/main.cpp index 6a1d95c5c9f..fa57ee6d182 100644 --- a/Ladybird/WebDriver/main.cpp +++ b/Userland/Services/WebDriver/main.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Tim Flynn + * Copyright (c) 2022-2024, Tim Flynn * * SPDX-License-Identifier: BSD-2-Clause */