ladybird/Ladybird/RequestServer/CMakeLists.txt
Shannon Booth e800605ad3 AK+LibURL: Move AK::URL into a new URL library
This URL library ends up being a relatively fundamental base library of
the system, as LibCore depends on LibURL.

This change has two main benefits:
 * Moving AK back more towards being an agnostic library that can
   be used between the kernel and userspace. URL has never really fit
   that description - and is not used in the kernel.
 * URL _should_ depend on LibUnicode, as it needs punnycode support.
   However, it's not really possible to do this inside of AK as it can't
   depend on any external library. This change brings us a little closer
   to being able to do that, but unfortunately we aren't there quite
   yet, as the code generators depend on LibCore.
2024-03-18 14:06:28 -04:00

44 lines
1.7 KiB
CMake

set(REQUESTSERVER_SOURCE_DIR ${SERENITY_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
${REQUESTSERVER_SOURCE_DIR}/ConnectionCache.cpp
${REQUESTSERVER_SOURCE_DIR}/Request.cpp
${REQUESTSERVER_SOURCE_DIR}/GeminiRequest.cpp
${REQUESTSERVER_SOURCE_DIR}/GeminiProtocol.cpp
${REQUESTSERVER_SOURCE_DIR}/HttpRequest.cpp
${REQUESTSERVER_SOURCE_DIR}/HttpProtocol.cpp
${REQUESTSERVER_SOURCE_DIR}/HttpsRequest.cpp
${REQUESTSERVER_SOURCE_DIR}/HttpsProtocol.cpp
${REQUESTSERVER_SOURCE_DIR}/Protocol.cpp
)
if (ANDROID)
add_library(requestserver SHARED
${REQUESTSERVER_SOURCES}
../Android/src/main/cpp/RequestServerService.cpp
../Android/src/main/cpp/LadybirdServiceBaseJNI.cpp
../Utilities.cpp
)
else()
add_library(requestserver STATIC ${REQUESTSERVER_SOURCES})
endif()
add_executable(RequestServer main.cpp)
target_link_libraries(RequestServer PRIVATE requestserver)
target_include_directories(requestserver PRIVATE ${SERENITY_SOURCE_DIR}/Userland/Services/)
target_include_directories(requestserver PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/..)
target_link_libraries(requestserver PUBLIC LibCore LibMain LibCrypto LibFileSystem LibGemini LibHTTP LibIPC LibMain LibTLS LibWebView LibWebSocket LibURL)
if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
# Solaris has socket and networking related functions in two extra libraries
target_link_libraries(requestserver PUBLIC nsl socket)
endif()
if (HAIKU)
# Haiku has networking related functions in the network library
target_link_libraries(RequestServer PRIVATE network)
endif()