mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
LibLocale+LibUnicode: Move generated CLDR data files to LibLocale folder
They are still included into LibUnicode, but this moves their generated location to be under LibLocale.
This commit is contained in:
parent
fc8bf7ac3e
commit
1e0276f541
Notes:
sideshowbarker
2024-07-17 18:46:30 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/1e0276f541 Pull-request: https://github.com/SerenityOS/serenity/pull/15096 Reviewed-by: https://github.com/linusg ✅
@ -40,24 +40,24 @@ if (ENABLE_UNICODE_DATABASE_DOWNLOAD)
|
||||
extract_path("${CLDR_PATH}" "${CLDR_ZIP_PATH}" "${CLDR_NUMBERS_SOURCE}/**" "${CLDR_NUMBERS_PATH}")
|
||||
extract_path("${CLDR_PATH}" "${CLDR_ZIP_PATH}" "${CLDR_UNITS_SOURCE}/**" "${CLDR_UNITS_PATH}")
|
||||
|
||||
set(DATE_TIME_FORMAT_DATA_HEADER LibUnicode/DateTimeFormatData.h)
|
||||
set(DATE_TIME_FORMAT_DATA_IMPLEMENTATION LibUnicode/DateTimeFormatData.cpp)
|
||||
set(DATE_TIME_FORMAT_DATA_HEADER LibLocale/DateTimeFormatData.h)
|
||||
set(DATE_TIME_FORMAT_DATA_IMPLEMENTATION LibLocale/DateTimeFormatData.cpp)
|
||||
|
||||
set(LOCALE_DATA_HEADER LibUnicode/LocaleData.h)
|
||||
set(LOCALE_DATA_IMPLEMENTATION LibUnicode/LocaleData.cpp)
|
||||
set(LOCALE_DATA_HEADER LibLocale/LocaleData.h)
|
||||
set(LOCALE_DATA_IMPLEMENTATION LibLocale/LocaleData.cpp)
|
||||
|
||||
set(NUMBER_FORMAT_DATA_HEADER LibUnicode/NumberFormatData.h)
|
||||
set(NUMBER_FORMAT_DATA_IMPLEMENTATION LibUnicode/NumberFormatData.cpp)
|
||||
set(NUMBER_FORMAT_DATA_HEADER LibLocale/NumberFormatData.h)
|
||||
set(NUMBER_FORMAT_DATA_IMPLEMENTATION LibLocale/NumberFormatData.cpp)
|
||||
|
||||
set(PLURAL_RULES_DATA_HEADER LibUnicode/PluralRulesData.h)
|
||||
set(PLURAL_RULES_DATA_IMPLEMENTATION LibUnicode/PluralRulesData.cpp)
|
||||
set(PLURAL_RULES_DATA_HEADER LibLocale/PluralRulesData.h)
|
||||
set(PLURAL_RULES_DATA_IMPLEMENTATION LibLocale/PluralRulesData.cpp)
|
||||
|
||||
set(RELATIVE_TIME_FORMAT_DATA_HEADER LibUnicode/RelativeTimeFormatData.h)
|
||||
set(RELATIVE_TIME_FORMAT_DATA_IMPLEMENTATION LibUnicode/RelativeTimeFormatData.cpp)
|
||||
set(RELATIVE_TIME_FORMAT_DATA_HEADER LibLocale/RelativeTimeFormatData.h)
|
||||
set(RELATIVE_TIME_FORMAT_DATA_IMPLEMENTATION LibLocale/RelativeTimeFormatData.cpp)
|
||||
|
||||
set(LOCALE_META_TARGET_PREFIX LibUnicode_)
|
||||
set(LOCALE_META_TARGET_PREFIX LibLocale_)
|
||||
|
||||
if (CMAKE_CURRENT_BINARY_DIR MATCHES ".*/LibUnicode") # Serenity build.
|
||||
if (CMAKE_CURRENT_BINARY_DIR MATCHES ".*/LibLocale") # Serenity build.
|
||||
set(DATE_TIME_FORMAT_DATA_HEADER DateTimeFormatData.h)
|
||||
set(DATE_TIME_FORMAT_DATA_IMPLEMENTATION DateTimeFormatData.cpp)
|
||||
|
||||
|
@ -1768,11 +1768,11 @@ static ErrorOr<void> generate_unicode_locale_implementation(Core::Stream::Buffer
|
||||
#include <AK/BinarySearch.h>
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <LibLocale/LocaleData.h>
|
||||
#include <LibLocale/DateTimeFormatData.h>
|
||||
#include <LibTimeZone/TimeZone.h>
|
||||
#include <LibUnicode/DateTimeFormat.h>
|
||||
#include <LibUnicode/DateTimeFormatData.h>
|
||||
#include <LibUnicode/Locale.h>
|
||||
#include <LibUnicode/LocaleData.h>
|
||||
|
||||
namespace Unicode {
|
||||
)~~~");
|
||||
|
@ -1102,10 +1102,10 @@ static ErrorOr<void> generate_unicode_locale_implementation(Core::Stream::Buffer
|
||||
#include <AK/Span.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibLocale/LocaleData.h>
|
||||
#include <LibUnicode/CurrencyCode.h>
|
||||
#include <LibUnicode/DateTimeFormat.h>
|
||||
#include <LibUnicode/Locale.h>
|
||||
#include <LibUnicode/LocaleData.h>
|
||||
|
||||
namespace Unicode {
|
||||
)~~~");
|
||||
|
@ -806,10 +806,10 @@ static ErrorOr<void> generate_unicode_locale_implementation(Core::Stream::Buffer
|
||||
#include <AK/Span.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibLocale/LocaleData.h>
|
||||
#include <LibLocale/NumberFormatData.h>
|
||||
#include <LibUnicode/Locale.h>
|
||||
#include <LibUnicode/LocaleData.h>
|
||||
#include <LibUnicode/NumberFormat.h>
|
||||
#include <LibUnicode/NumberFormatData.h>
|
||||
#include <LibUnicode/PluralRules.h>
|
||||
|
||||
namespace Unicode {
|
||||
|
@ -460,10 +460,10 @@ static ErrorOr<void> generate_unicode_locale_implementation(Core::Stream::Buffer
|
||||
|
||||
generator.append(R"~~~(
|
||||
#include <AK/Array.h>
|
||||
#include <LibLocale/LocaleData.h>
|
||||
#include <LibLocale/PluralRulesData.h>
|
||||
#include <LibUnicode/Locale.h>
|
||||
#include <LibUnicode/LocaleData.h>
|
||||
#include <LibUnicode/PluralRules.h>
|
||||
#include <LibUnicode/PluralRulesData.h>
|
||||
#include <math.h>
|
||||
|
||||
namespace Unicode {
|
||||
|
@ -202,10 +202,10 @@ static ErrorOr<void> generate_unicode_locale_implementation(Core::Stream::Buffer
|
||||
#include <AK/Array.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibLocale/RelativeTimeFormatData.h>
|
||||
#include <LibUnicode/Locale.h>
|
||||
#include <LibUnicode/PluralRules.h>
|
||||
#include <LibUnicode/RelativeTimeFormat.h>
|
||||
#include <LibUnicode/RelativeTimeFormatData.h>
|
||||
|
||||
namespace Unicode {
|
||||
)~~~");
|
||||
|
@ -686,8 +686,8 @@ enum class @name@ : @underlying@ {)~~~");
|
||||
#pragma once
|
||||
|
||||
#include <AK/Types.h>
|
||||
#include <LibLocale/LocaleData.h>
|
||||
#include <LibUnicode/Forward.h>
|
||||
#include <LibUnicode/LocaleData.h>
|
||||
|
||||
namespace Unicode {
|
||||
)~~~");
|
||||
|
@ -32,6 +32,7 @@ add_subdirectory(LibIPC)
|
||||
add_subdirectory(LibJS)
|
||||
add_subdirectory(LibKeyboard)
|
||||
add_subdirectory(LibLine)
|
||||
add_subdirectory(LibLocale)
|
||||
add_subdirectory(LibM)
|
||||
add_subdirectory(LibMain)
|
||||
add_subdirectory(LibMarkdown)
|
||||
|
8
Userland/Libraries/LibLocale/CMakeLists.txt
Normal file
8
Userland/Libraries/LibLocale/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
||||
include(${SerenityOS_SOURCE_DIR}/Meta/CMake/locale_data.cmake)
|
||||
|
||||
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()
|
@ -1,12 +1,4 @@
|
||||
include(${SerenityOS_SOURCE_DIR}/Meta/CMake/unicode_data.cmake)
|
||||
include(${SerenityOS_SOURCE_DIR}/Meta/CMake/locale_data.cmake)
|
||||
|
||||
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
|
||||
CharacterTypes.cpp
|
||||
@ -22,7 +14,3 @@ set(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 LOCALE_DATA_SOURCES)
|
||||
add_dependencies(LibUnicode LibLocaleData)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user