From c9d9e1bb1f968165940f60d6b4b6ea0e32d1a027 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Sun, 23 Jun 2024 08:35:17 -0400 Subject: [PATCH] Meta: Exclude LibCore, LibUnicode, and LibURL from the lagom-tools build We only need LibCoreMinimal for the lagom-tools build. In particular, by removing LibUnicode, we remove the lagom-tools dependence on the system ICU package, as we do not have vcpkg hooked into this build. (We could probably add vcpkg here, but since this libraries aren't even needed, we don't need to bother). --- Meta/Lagom/CMakeLists.txt | 32 ++++++++++++----------- Userland/Libraries/LibCore/CMakeLists.txt | 4 +++ 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/Meta/Lagom/CMakeLists.txt b/Meta/Lagom/CMakeLists.txt index c13def0bb17..d866e51aa66 100644 --- a/Meta/Lagom/CMakeLists.txt +++ b/Meta/Lagom/CMakeLists.txt @@ -334,26 +334,12 @@ if (Backtrace_FOUND AND NOT "${Backtrace_LIBRARIES}" STREQUAL "") target_include_directories(AK PRIVATE ${Backtrace_INCLUDE_DIRS}) endif() -add_serenity_subdirectory(Userland/Libraries/LibUnicode) -add_serenity_subdirectory(Userland/Libraries/LibURL) - -# LibCore +# LibCoreMinimal add_serenity_subdirectory(Userland/Libraries/LibCore) -target_link_libraries(LibCore PRIVATE Threads::Threads) if (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") # NetBSD has its shm_open and shm_unlink functions in librt so we need to link that - target_link_libraries(LibCore PRIVATE rt) target_link_libraries(LibCoreMinimal PRIVATE rt) endif() -if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS") - # Solaris has socket and networking related functions in two extra libraries - target_link_libraries(LibCore PRIVATE nsl socket) -endif() -if (HAIKU) - # Haiku has networking related functions in the network library - target_link_libraries(LibCore PRIVATE network) -endif() -target_link_libraries(LibCore PRIVATE LibURL) # LibMain add_serenity_subdirectory(Userland/Libraries/LibMain) @@ -417,6 +403,8 @@ set(lagom_standard_libraries TextCodec Threading TLS + Unicode + URL Wasm Web WebSocket @@ -424,6 +412,20 @@ set(lagom_standard_libraries XML ) +target_link_libraries(LibCore PRIVATE LibURL Threads::Threads) +if (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD") + # NetBSD has its shm_open and shm_unlink functions in librt so we need to link that + target_link_libraries(LibCore PRIVATE rt) +endif() +if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS") + # Solaris has socket and networking related functions in two extra libraries + target_link_libraries(LibCore PRIVATE nsl socket) +endif() +if (HAIKU) + # Haiku has networking related functions in the network library + target_link_libraries(LibCore PRIVATE network) +endif() + compile_ipc(${SERENITY_PROJECT_ROOT}/Userland/Services/RequestServer/RequestClient.ipc Userland/Services/RequestServer/RequestClientEndpoint.h) compile_ipc(${SERENITY_PROJECT_ROOT}/Userland/Services/RequestServer/RequestServer.ipc Userland/Services/RequestServer/RequestServerEndpoint.h) compile_ipc(${SERENITY_PROJECT_ROOT}/Userland/Services/WebContent/WebContentServer.ipc Userland/Services/WebContent/WebContentServerEndpoint.h) diff --git a/Userland/Libraries/LibCore/CMakeLists.txt b/Userland/Libraries/LibCore/CMakeLists.txt index 565fd788ad1..45a859f24fd 100644 --- a/Userland/Libraries/LibCore/CMakeLists.txt +++ b/Userland/Libraries/LibCore/CMakeLists.txt @@ -14,6 +14,10 @@ set(SOURCES serenity_lib(LibCoreMinimal coreminimal) +if (LAGOM_TOOLS_ONLY) + return() +endif() + set(SOURCES AnonymousBuffer.cpp Command.cpp