From 27eda77c9736361f15407c29e5258f635b1cd8d5 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Wed, 26 Jan 2022 08:56:09 -0500 Subject: LibUnicode: Create a nearly empty generator for relative-time formatting This sets up the generator plumbing to create the relative-time data files. This data could probably be included in the date-time generator, but that generator is large enough that I'd rather put this tangentially related data in its own file. --- Meta/CMake/unicode_data.cmake | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Meta/CMake/unicode_data.cmake') diff --git a/Meta/CMake/unicode_data.cmake b/Meta/CMake/unicode_data.cmake index 3cdb05dc4a..b64e9243f1 100644 --- a/Meta/CMake/unicode_data.cmake +++ b/Meta/CMake/unicode_data.cmake @@ -117,6 +117,9 @@ if (ENABLE_UNICODE_DATABASE_DOWNLOAD) set(UNICODE_NUMBER_FORMAT_HEADER LibUnicode/UnicodeNumberFormat.h) set(UNICODE_NUMBER_FORMAT_IMPLEMENTATION LibUnicode/UnicodeNumberFormat.cpp) + set(UNICODE_RELATIVE_TIME_FORMAT_HEADER LibUnicode/UnicodeRelativeTimeFormat.h) + set(UNICODE_RELATIVE_TIME_FORMAT_IMPLEMENTATION LibUnicode/UnicodeRelativeTimeFormat.cpp) + set(UNICODE_META_TARGET_PREFIX LibUnicode_) if (CMAKE_CURRENT_BINARY_DIR MATCHES ".*/LibUnicode") # Serenity build. @@ -132,6 +135,9 @@ if (ENABLE_UNICODE_DATABASE_DOWNLOAD) set(UNICODE_NUMBER_FORMAT_HEADER UnicodeNumberFormat.h) set(UNICODE_NUMBER_FORMAT_IMPLEMENTATION UnicodeNumberFormat.cpp) + set(UNICODE_RELATIVE_TIME_FORMAT_HEADER UnicodeRelativeTimeFormat.h) + set(UNICODE_RELATIVE_TIME_FORMAT_IMPLEMENTATION UnicodeRelativeTimeFormat.cpp) + set(UNICODE_META_TARGET_PREFIX "") endif() @@ -171,6 +177,15 @@ if (ENABLE_UNICODE_DATABASE_DOWNLOAD) "${UNICODE_NUMBER_FORMAT_IMPLEMENTATION}" arguments -r "${CLDR_CORE_PATH}" -n "${CLDR_NUMBERS_PATH}" -u "${CLDR_UNITS_PATH}" ) + invoke_generator( + "UnicodeRelativeTimeFormat" + Lagom::GenerateUnicodeRelativeTimeFormat + "${CLDR_VERSION_FILE}" + "${UNICODE_META_TARGET_PREFIX}" + "${UNICODE_RELATIVE_TIME_FORMAT_HEADER}" + "${UNICODE_RELATIVE_TIME_FORMAT_IMPLEMENTATION}" + arguments -d "${CLDR_DATES_PATH}" + ) set(UNICODE_DATA_SOURCES ${UNICODE_DATA_HEADER} @@ -181,5 +196,7 @@ if (ENABLE_UNICODE_DATABASE_DOWNLOAD) ${UNICODE_LOCALE_IMPLEMENTATION} ${UNICODE_NUMBER_FORMAT_HEADER} ${UNICODE_NUMBER_FORMAT_IMPLEMENTATION} + ${UNICODE_RELATIVE_TIME_FORMAT_HEADER} + ${UNICODE_RELATIVE_TIME_FORMAT_IMPLEMENTATION} ) endif() -- cgit v1.2.3