1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-29 05:07:45 +00:00

Everywhere: Move all host tools into the Lagom/Tools subdirectory

This allows us to remove all the add_subdirectory calls from the top
level CMakeLists.txt that referred to targets linking LagomCore.

Segregating the host tools and Serenity targets helps us get to a place
where the main Serenity build can simply use a CMake toolchain file
rather than swapping all the compiler/sysroot variables after building
host libraries and tools.
This commit is contained in:
Andrew Kaster 2021-08-08 01:31:23 -06:00 committed by Linus Groh
parent fb15cdcc10
commit 63956b36d0
19 changed files with 18 additions and 22 deletions

View file

@ -220,6 +220,12 @@ if (NOT APPLE)
target_link_libraries(LagomCore crypt) # Core::Account uses crypt() but it's not in libcrypt on macOS
endif()
# Code Generators and other host tools
# We need to make sure not to build code generators for Fuzzer builds, as they already have their own main.cpp
if (NOT ENABLE_OSS_FUZZ AND NOT ENABLE_FUZZER_SANITIZER)
add_subdirectory(Tools)
endif()
if (BUILD_LAGOM)
# Lagom Libraries
@ -364,13 +370,8 @@ if (BUILD_LAGOM)
)
# Unicode
# We need to make sure not to build code generators for Fuzzer builds, as they already have their own main.cpp
# Don't include UnicodeData for Fuzzer builds, we didn't build the CodeGenerators
if (NOT ENABLE_OSS_FUZZ AND NOT ENABLE_FUZZER_SANITIZER)
# FIXME: Make this logic smarter in 4594
if (NOT CMAKE_SOURCE_DIR STREQUAL SERENITY_PROJECT_ROOT)
set(write_if_different ${CMAKE_CURRENT_SOURCE_DIR}/../write-only-on-difference.sh)
add_subdirectory(../../Userland/Libraries/LibUnicode/CodeGenerators ${CMAKE_CURRENT_BINARY_DIR}/LibUnicode/CodeGenerators)
endif()
include(${SERENITY_PROJECT_ROOT}/Meta/CMake/unicode_data.cmake)
else()
set(ENABLE_UNICODE_DATABASE_DOWNLOAD OFF)