mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03:00
LibUnicode+Userland: Migrate generated CLDR data to LibLocaleData
Currently, LibUnicodeData contains the generated UCD and CLDR data. Move the UCD data to the main LibUnicode library, and rename LibUnicodeData to LibLocaleData. This is another prepatory change to migrate to LibLocale.
This commit is contained in:
parent
89d1813b5d
commit
fc8bf7ac3e
Notes:
sideshowbarker
2024-07-17 20:22:04 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/fc8bf7ac3e Pull-request: https://github.com/SerenityOS/serenity/pull/15096 Reviewed-by: https://github.com/linusg ✅
@ -166,9 +166,9 @@ function(embed_resource target section file)
|
||||
target_sources("${target}" PRIVATE "${asm_file}")
|
||||
endfunction()
|
||||
|
||||
function(link_with_unicode_data target)
|
||||
function(link_with_locale_data target)
|
||||
if (ENABLE_UNICODE_DATABASE_DOWNLOAD)
|
||||
target_link_libraries("${target}" LibUnicodeData)
|
||||
target_link_libraries("${target}" LibLocaleData)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
serenity_testjs_test(test-js.cpp test-js)
|
||||
|
||||
install(TARGETS test-js RUNTIME DESTINATION bin OPTIONAL)
|
||||
link_with_unicode_data(test-js)
|
||||
link_with_locale_data(test-js)
|
||||
|
||||
serenity_test(test-invalid-unicode-js.cpp LibJS LIBS LibJS)
|
||||
link_with_unicode_data(test-invalid-unicode-js)
|
||||
link_with_locale_data(test-invalid-unicode-js)
|
||||
|
||||
serenity_test(test-bytecode-js.cpp LibJS LIBS LibJS)
|
||||
link_with_unicode_data(test-bytecode-js)
|
||||
link_with_locale_data(test-bytecode-js)
|
||||
|
@ -7,5 +7,3 @@ set(TEST_SOURCES
|
||||
foreach(source IN LISTS TEST_SOURCES)
|
||||
serenity_test("${source}" LibRegex LIBS LibRegex)
|
||||
endforeach()
|
||||
|
||||
link_with_unicode_data(Regex)
|
||||
|
@ -8,5 +8,5 @@ foreach(source IN LISTS TEST_SOURCES)
|
||||
serenity_test("${source}" LibUnicode LIBS LibUnicode)
|
||||
|
||||
get_filename_component(target "${source}" NAME_WLE)
|
||||
link_with_unicode_data("${target}")
|
||||
link_with_locale_data("${target}")
|
||||
endforeach()
|
||||
|
@ -1,3 +1,2 @@
|
||||
serenity_testjs_test(test-spreadsheet.cpp test-spreadsheet)
|
||||
install(TARGETS test-spreadsheet RUNTIME DESTINATION bin OPTIONAL)
|
||||
link_with_unicode_data(test-spreadsheet)
|
||||
|
@ -11,4 +11,3 @@ set(SOURCES
|
||||
|
||||
serenity_app(Assistant ICON app-run)
|
||||
target_link_libraries(Assistant LibCore LibDesktop LibGUI LibJS LibMain LibThreading)
|
||||
link_with_unicode_data(Assistant)
|
||||
|
@ -34,4 +34,4 @@ set(SOURCES
|
||||
|
||||
serenity_app(Browser ICON app-browser)
|
||||
target_link_libraries(Browser LibWebView LibWeb LibProtocol LibGUI LibDesktop LibConfig LibMain)
|
||||
link_with_unicode_data(Browser)
|
||||
link_with_locale_data(Browser)
|
||||
|
@ -16,5 +16,4 @@ set(SOURCES
|
||||
)
|
||||
|
||||
serenity_app(CharacterMap ICON app-character-map)
|
||||
target_link_libraries(CharacterMap LibDesktop LibGUI LibMain)
|
||||
link_with_unicode_data(CharacterMap)
|
||||
target_link_libraries(CharacterMap LibDesktop LibGUI LibMain LibUnicode)
|
||||
|
@ -19,4 +19,4 @@ set(SOURCES
|
||||
|
||||
serenity_app(ClockSettings ICON app-analog-clock) # FIXME: Create a ClockSettings icon.
|
||||
target_link_libraries(ClockSettings LibGUI LibMain LibUnicode)
|
||||
link_with_unicode_data(ClockSettings)
|
||||
link_with_locale_data(ClockSettings)
|
||||
|
@ -23,5 +23,4 @@ set(SOURCES
|
||||
)
|
||||
|
||||
serenity_app(FontEditor ICON app-font-editor)
|
||||
target_link_libraries(FontEditor LibGUI LibDesktop LibGfx LibMain)
|
||||
link_with_unicode_data(FontEditor)
|
||||
target_link_libraries(FontEditor LibGUI LibDesktop LibGfx LibMain LibUnicode)
|
||||
|
@ -19,4 +19,3 @@ set(SOURCES
|
||||
|
||||
serenity_app(Help ICON app-help)
|
||||
target_link_libraries(Help LibWebView LibWeb LibMarkdown LibGUI LibDesktop LibMain)
|
||||
link_with_unicode_data(Help)
|
||||
|
@ -43,7 +43,6 @@ set(GENERATED_SOURCES
|
||||
|
||||
serenity_app(Spreadsheet ICON app-spreadsheet)
|
||||
target_link_libraries(Spreadsheet LibFileSystemAccessClient LibGUI LibJS LibMain LibWebView LibWeb)
|
||||
link_with_unicode_data(Spreadsheet)
|
||||
|
||||
serenity_test(Writers/Test/TestXSVWriter.cpp Spreadsheet)
|
||||
|
||||
|
@ -16,4 +16,3 @@ set(SOURCES
|
||||
|
||||
serenity_app(TextEditor ICON app-text-editor)
|
||||
target_link_libraries(TextEditor LibWebView LibWeb LibMarkdown LibGUI LibShell LibRegex LibDesktop LibCpp LibJS LibSQL LibFileSystemAccessClient LibConfig LibMain)
|
||||
link_with_unicode_data(TextEditor)
|
||||
|
@ -56,5 +56,4 @@ set(SOURCES
|
||||
|
||||
serenity_app(HackStudio ICON app-hack-studio)
|
||||
target_link_libraries(HackStudio LibWebView LibWeb LibMarkdown LibGUI LibCpp LibGfx LibCore LibVT LibDebug LibX86 LibDiff LibShell LibSymbolication LibRegex LibSQL LibCoredump LibMain)
|
||||
link_with_unicode_data(HackStudio)
|
||||
add_dependencies(HackStudio CppLanguageServer)
|
||||
|
@ -1,11 +1,11 @@
|
||||
include(${SerenityOS_SOURCE_DIR}/Meta/CMake/unicode_data.cmake)
|
||||
include(${SerenityOS_SOURCE_DIR}/Meta/CMake/locale_data.cmake)
|
||||
|
||||
if (DEFINED UNICODE_DATA_SOURCES)
|
||||
set(SOURCES ${UNICODE_DATA_SOURCES} ${LOCALE_DATA_SOURCES})
|
||||
serenity_lib(LibUnicodeData unicodedata)
|
||||
target_compile_options(LibUnicodeData PRIVATE -g0 -Os -Wno-parentheses-equality)
|
||||
target_link_libraries(LibUnicodeData LibCore LibTimeZone)
|
||||
if (DEFINED LOCALE_DATA_SOURCES)
|
||||
set(SOURCES ${LOCALE_DATA_SOURCES})
|
||||
serenity_lib(LibLocaleData localedata)
|
||||
target_compile_options(LibLocaleData PRIVATE -g0 -Os -Wno-parentheses-equality)
|
||||
target_link_libraries(LibLocaleData LibCore LibTimeZone)
|
||||
endif()
|
||||
|
||||
set(SOURCES
|
||||
@ -16,12 +16,13 @@ set(SOURCES
|
||||
NumberFormat.cpp
|
||||
PluralRules.cpp
|
||||
RelativeTimeFormat.cpp
|
||||
${UNICODE_DATA_SOURCES}
|
||||
)
|
||||
|
||||
serenity_lib(LibUnicode unicode)
|
||||
target_link_libraries(LibUnicode LibCore)
|
||||
target_compile_definitions(LibUnicode PRIVATE ENABLE_UNICODE_DATA=$<BOOL:${ENABLE_UNICODE_DATABASE_DOWNLOAD}>)
|
||||
|
||||
if (DEFINED UNICODE_DATA_SOURCES)
|
||||
add_dependencies(LibUnicode LibUnicodeData)
|
||||
if (DEFINED LOCALE_DATA_SOURCES)
|
||||
add_dependencies(LibUnicode LibLocaleData)
|
||||
endif()
|
||||
|
@ -407,7 +407,7 @@ serenity_lib(LibWeb web)
|
||||
|
||||
# NOTE: We link with LibSoftGPU here instead of lazy loading it via dlopen() so that we do not have to unveil the library and pledge prot_exec.
|
||||
target_link_libraries(LibWeb LibCore LibJS LibMarkdown LibGemini LibGL LibGUI LibGfx LibSoftGPU LibTextCodec LibWasm LibXML)
|
||||
link_with_unicode_data(LibWeb)
|
||||
link_with_locale_data(LibWeb)
|
||||
|
||||
generate_js_wrappers(LibWeb)
|
||||
|
||||
|
@ -19,4 +19,4 @@ set(SOURCES
|
||||
|
||||
serenity_bin(WebContent)
|
||||
target_link_libraries(WebContent LibCore LibIPC LibGfx LibWebView LibWeb LibMain)
|
||||
link_with_unicode_data(WebContent)
|
||||
link_with_locale_data(WebContent)
|
||||
|
@ -136,7 +136,7 @@ target_link_libraries(ini LibMain)
|
||||
target_link_libraries(install-bin LibMain)
|
||||
target_link_libraries(jp LibMain)
|
||||
target_link_libraries(js LibJS LibLine LibMain LibTextCodec)
|
||||
link_with_unicode_data(js)
|
||||
link_with_locale_data(js)
|
||||
target_link_libraries(kcov-example LibMain)
|
||||
target_link_libraries(keymap LibKeyboard LibMain)
|
||||
target_link_libraries(kill LibMain)
|
||||
|
Loading…
Reference in New Issue
Block a user