diff --git a/Ladybird/CMakeLists.txt b/Ladybird/CMakeLists.txt index 367afacdba7..edd7312d560 100644 --- a/Ladybird/CMakeLists.txt +++ b/Ladybird/CMakeLists.txt @@ -132,7 +132,6 @@ else() endif() add_subdirectory(Headless) -add_subdirectory(RequestServer) add_subdirectory(WebContent) add_subdirectory(WebWorker) diff --git a/Userland/Services/CMakeLists.txt b/Userland/Services/CMakeLists.txt index ae8f41a16ef..a4766dcd15e 100644 --- a/Userland/Services/CMakeLists.txt +++ b/Userland/Services/CMakeLists.txt @@ -1,2 +1,3 @@ add_subdirectory(ImageDecoder) +add_subdirectory(RequestServer) add_subdirectory(WebDriver) diff --git a/Ladybird/RequestServer/CMakeLists.txt b/Userland/Services/RequestServer/CMakeLists.txt similarity index 69% rename from Ladybird/RequestServer/CMakeLists.txt rename to Userland/Services/RequestServer/CMakeLists.txt index fb579ba24b3..4147370a861 100644 --- a/Ladybird/RequestServer/CMakeLists.txt +++ b/Userland/Services/RequestServer/CMakeLists.txt @@ -1,33 +1,33 @@ -set(REQUESTSERVER_SOURCE_DIR ${LADYBIRD_SOURCE_DIR}/Userland/Services/RequestServer) - set(CMAKE_AUTOMOC OFF) set(CMAKE_AUTORCC OFF) set(CMAKE_AUTOUIC OFF) -set(REQUESTSERVER_SOURCES - ${REQUESTSERVER_SOURCE_DIR}/ConnectionFromClient.cpp +set(SOURCES + ConnectionFromClient.cpp ) if (ANDROID) add_library(requestserverservice SHARED - ${REQUESTSERVER_SOURCES} - ../Android/src/main/cpp/RequestServerService.cpp - ../Android/src/main/cpp/LadybirdServiceBaseJNI.cpp - ../Utilities.cpp + ${LADYBIRD_SOURCE_DIR}/Ladybird/Android/src/main/cpp/RequestServerService.cpp + ${LADYBIRD_SOURCE_DIR}/Ladybird/Android/src/main/cpp/LadybirdServiceBaseJNI.cpp + ${LADYBIRD_SOURCE_DIR}/Ladybird/Utilities.cpp + ${SOURCES} ) else() - add_library(requestserverservice STATIC ${REQUESTSERVER_SOURCES}) + add_library(requestserverservice STATIC ${SOURCES}) endif() find_package(PkgConfig) find_package(CURL REQUIRED) add_executable(RequestServer main.cpp) -target_link_libraries(RequestServer PRIVATE requestserverservice) +target_include_directories(requestserverservice PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/../..) target_include_directories(requestserverservice PRIVATE ${LADYBIRD_SOURCE_DIR}/Userland/Services/) -target_include_directories(requestserverservice PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/..) + +target_link_libraries(RequestServer PRIVATE requestserverservice) target_link_libraries(requestserverservice PUBLIC LibCore LibMain LibCrypto LibFileSystem LibIPC LibMain LibTLS LibWebView LibWebSocket LibURL LibTextCodec LibThreading CURL::libcurl) + if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS") # Solaris has socket and networking related functions in two extra libraries target_link_libraries(requestserverservice PUBLIC nsl socket) diff --git a/Ladybird/RequestServer/main.cpp b/Userland/Services/RequestServer/main.cpp similarity index 100% rename from Ladybird/RequestServer/main.cpp rename to Userland/Services/RequestServer/main.cpp