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

LibLocale: Move locale source files to the LibLocale library

Everything is now setup to create the LibLocale library and link it
where needed.
This commit is contained in:
Timothy Flynn 2022-09-02 13:08:22 -04:00 committed by Tim Flynn
parent f082b6ae48
commit 9e860d973e
7 changed files with 38 additions and 17 deletions

View file

@ -424,7 +424,7 @@ if (BUILD_LAGOM)
list(REMOVE_ITEM LIBJS_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../../Userland/Libraries/LibJS/SyntaxHighlighter.cpp")
lagom_lib(JS js
SOURCES ${LIBJS_SOURCES} ${LIBJS_SUBDIR_SOURCES} ${LIBJS_SUBSUBDIR_SOURCES}
LIBS m LibCrypto LibRegex LibUnicode LibTextCodec
LIBS m LibCrypto LibRegex LibLocale LibUnicode LibTextCodec
)
# Line
@ -433,6 +433,16 @@ if (BUILD_LAGOM)
SOURCES ${LIBLINE_SOURCES}
)
# Locale
include(locale_data)
file(GLOB LIBLOCALE_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibLocale/*.cpp")
lagom_lib(Locale locale
SOURCES ${LIBLOCALE_SOURCES} ${LOCALE_DATA_SOURCES}
)
target_compile_definitions(LibLocale PRIVATE ENABLE_UNICODE_DATA=$<BOOL:${ENABLE_UNICODE_DATABASE_DOWNLOAD}>)
target_compile_options(LibLocale PRIVATE -Wno-parentheses-equality)
target_link_libraries(LibLocale LibTimeZone LibUnicode)
# Markdown
file(GLOB LIBMARKDOWN_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibMarkdown/*.cpp")
lagom_lib(Markdown markdown
@ -502,15 +512,11 @@ if (BUILD_LAGOM)
# Unicode
include(unicode_data)
include(locale_data)
file(GLOB LIBUNICODE_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibUnicode/*.cpp")
file(GLOB LIBLOCALE_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibLocale/*.cpp")
lagom_lib(Unicode unicode
SOURCES ${LIBUNICODE_SOURCES} ${UNICODE_DATA_SOURCES} ${LIBLOCALE_SOURCES} ${LOCALE_DATA_SOURCES}
SOURCES ${LIBUNICODE_SOURCES} ${UNICODE_DATA_SOURCES}
)
target_compile_definitions(LibUnicode PRIVATE ENABLE_UNICODE_DATA=$<BOOL:${ENABLE_UNICODE_DATABASE_DOWNLOAD}>)
target_compile_options(LibUnicode PRIVATE -Wno-parentheses-equality)
target_link_libraries(LibUnicode LibTimeZone)
# WASM
file(GLOB LIBWASM_SOURCES CONFIGURE_DEPENDS "../../Userland/Libraries/LibWasm/*/*.cpp")
@ -675,6 +681,12 @@ if (BUILD_LAGOM)
lagom_test(${source} WORKING_DIRECTORY LIBS LibGL LibGPU LibSoftGPU)
endforeach()
# Locale
file(GLOB LIBLOCALE_TEST_SOURCES CONFIGURE_DEPENDS "../../Tests/LibLocale/*.cpp")
foreach(source ${LIBLOCALE_TEST_SOURCES})
lagom_test(${source} LIBS LibLocale LibUnicode)
endforeach()
# PDF
file(GLOB LIBPDF_TESTS CONFIGURE_DEPENDS "../../Tests/LibPDF/*.cpp")
foreach(source ${LIBPDF_TESTS})
@ -727,8 +739,7 @@ if (BUILD_LAGOM)
# Unicode
file(GLOB LIBUNICODE_TEST_SOURCES CONFIGURE_DEPENDS "../../Tests/LibUnicode/*.cpp")
file(GLOB LIBLOCALE_TEST_SOURCES CONFIGURE_DEPENDS "../../Tests/LibLocale/*.cpp")
foreach(source ${LIBUNICODE_TEST_SOURCES} ${LIBLOCALE_TEST_SOURCES})
foreach(source ${LIBUNICODE_TEST_SOURCES})
lagom_test(${source} LIBS LibUnicode)
endforeach()