diff --git a/Meta/CMake/utils.cmake b/Meta/CMake/utils.cmake index c8557c7f75..23c73122c0 100644 --- a/Meta/CMake/utils.cmake +++ b/Meta/CMake/utils.cmake @@ -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() diff --git a/Tests/LibJS/CMakeLists.txt b/Tests/LibJS/CMakeLists.txt index 5ed112091d..8b62b1cfaa 100644 --- a/Tests/LibJS/CMakeLists.txt +++ b/Tests/LibJS/CMakeLists.txt @@ -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) diff --git a/Tests/LibRegex/CMakeLists.txt b/Tests/LibRegex/CMakeLists.txt index d632992976..eeeacecfba 100644 --- a/Tests/LibRegex/CMakeLists.txt +++ b/Tests/LibRegex/CMakeLists.txt @@ -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) diff --git a/Tests/LibUnicode/CMakeLists.txt b/Tests/LibUnicode/CMakeLists.txt index 42c89a6d80..3e056c5994 100644 --- a/Tests/LibUnicode/CMakeLists.txt +++ b/Tests/LibUnicode/CMakeLists.txt @@ -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() diff --git a/Tests/Spreadsheet/CMakeLists.txt b/Tests/Spreadsheet/CMakeLists.txt index 1a710f372a..e0aa8ef5f2 100644 --- a/Tests/Spreadsheet/CMakeLists.txt +++ b/Tests/Spreadsheet/CMakeLists.txt @@ -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) diff --git a/Userland/Applications/Assistant/CMakeLists.txt b/Userland/Applications/Assistant/CMakeLists.txt index 478c4dbe69..5db6ae2b46 100644 --- a/Userland/Applications/Assistant/CMakeLists.txt +++ b/Userland/Applications/Assistant/CMakeLists.txt @@ -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) diff --git a/Userland/Applications/Browser/CMakeLists.txt b/Userland/Applications/Browser/CMakeLists.txt index 73a2f8560b..c6fe8b8e01 100644 --- a/Userland/Applications/Browser/CMakeLists.txt +++ b/Userland/Applications/Browser/CMakeLists.txt @@ -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) diff --git a/Userland/Applications/CharacterMap/CMakeLists.txt b/Userland/Applications/CharacterMap/CMakeLists.txt index e98bb69e4a..4e7130890d 100644 --- a/Userland/Applications/CharacterMap/CMakeLists.txt +++ b/Userland/Applications/CharacterMap/CMakeLists.txt @@ -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) diff --git a/Userland/Applications/ClockSettings/CMakeLists.txt b/Userland/Applications/ClockSettings/CMakeLists.txt index 39cee55209..1e134c9fc4 100644 --- a/Userland/Applications/ClockSettings/CMakeLists.txt +++ b/Userland/Applications/ClockSettings/CMakeLists.txt @@ -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) diff --git a/Userland/Applications/FontEditor/CMakeLists.txt b/Userland/Applications/FontEditor/CMakeLists.txt index 575538cc4d..46ba969c6d 100644 --- a/Userland/Applications/FontEditor/CMakeLists.txt +++ b/Userland/Applications/FontEditor/CMakeLists.txt @@ -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) diff --git a/Userland/Applications/Help/CMakeLists.txt b/Userland/Applications/Help/CMakeLists.txt index 8d83193751..90c2d41227 100644 --- a/Userland/Applications/Help/CMakeLists.txt +++ b/Userland/Applications/Help/CMakeLists.txt @@ -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) diff --git a/Userland/Applications/Spreadsheet/CMakeLists.txt b/Userland/Applications/Spreadsheet/CMakeLists.txt index 17d66eb4af..9ba6517162 100644 --- a/Userland/Applications/Spreadsheet/CMakeLists.txt +++ b/Userland/Applications/Spreadsheet/CMakeLists.txt @@ -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) diff --git a/Userland/Applications/TextEditor/CMakeLists.txt b/Userland/Applications/TextEditor/CMakeLists.txt index 9250b3c820..8f842fed5c 100644 --- a/Userland/Applications/TextEditor/CMakeLists.txt +++ b/Userland/Applications/TextEditor/CMakeLists.txt @@ -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) diff --git a/Userland/DevTools/HackStudio/CMakeLists.txt b/Userland/DevTools/HackStudio/CMakeLists.txt index 3845c9d76e..095473ba88 100644 --- a/Userland/DevTools/HackStudio/CMakeLists.txt +++ b/Userland/DevTools/HackStudio/CMakeLists.txt @@ -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) diff --git a/Userland/Libraries/LibUnicode/CMakeLists.txt b/Userland/Libraries/LibUnicode/CMakeLists.txt index 283d6ce003..5cee8bf451 100644 --- a/Userland/Libraries/LibUnicode/CMakeLists.txt +++ b/Userland/Libraries/LibUnicode/CMakeLists.txt @@ -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=$) -if (DEFINED UNICODE_DATA_SOURCES) - add_dependencies(LibUnicode LibUnicodeData) +if (DEFINED LOCALE_DATA_SOURCES) + add_dependencies(LibUnicode LibLocaleData) endif() diff --git a/Userland/Libraries/LibWeb/CMakeLists.txt b/Userland/Libraries/LibWeb/CMakeLists.txt index 5b05fdc915..7856ca08db 100644 --- a/Userland/Libraries/LibWeb/CMakeLists.txt +++ b/Userland/Libraries/LibWeb/CMakeLists.txt @@ -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) diff --git a/Userland/Services/WebContent/CMakeLists.txt b/Userland/Services/WebContent/CMakeLists.txt index c943b55c51..3ec41acdb5 100644 --- a/Userland/Services/WebContent/CMakeLists.txt +++ b/Userland/Services/WebContent/CMakeLists.txt @@ -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) diff --git a/Userland/Utilities/CMakeLists.txt b/Userland/Utilities/CMakeLists.txt index fddcfd195a..131b4e3fc4 100644 --- a/Userland/Utilities/CMakeLists.txt +++ b/Userland/Utilities/CMakeLists.txt @@ -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)