1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 21:07:35 +00:00

Meta+LibUnicode: Move unicode_data helper to Meta/CMake

Moving this helper CMake file to the centralized Meta/CMake folder helps
to get a better grasp on what extra files are required for the build,
and what files are generated.

While we're at it, don't use add_compile_definitions for
ENABLE_UNICODE_DATA, which only needs to be seen by LibUnicode sources.
This commit is contained in:
Andrew Kaster 2021-08-08 00:06:55 -06:00 committed by Linus Groh
parent 47471c0ec2
commit e88761b2b9
6 changed files with 11 additions and 10 deletions

View file

@ -371,12 +371,15 @@ if (BUILD_LAGOM)
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(../../Userland/Libraries/LibUnicode/unicode_data.cmake)
include(${SERENITY_PROJECT_ROOT}/Meta/CMake/unicode_data.cmake)
else()
set(ENABLE_UNICODE_DATABASE_DOWNLOAD OFF)
endif()
file(GLOB LIBUNICODE_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibUnicode/*.cpp")
lagom_lib(Unicode unicode
SOURCES ${LIBUNICODE_SOURCES} ${UNICODE_DATA_SOURCES}
)
target_compile_definitions(LagomUnicode PRIVATE ENABLE_UNICODE_DATA=$<BOOL:${ENABLE_UNICODE_DATABASE_DOWNLOAD}>)
# WASM
file(GLOB LIBWASM_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibWasm/*/*.cpp")