summaryrefslogtreecommitdiff
path: root/Meta/CMake
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-01-26 08:56:09 -0500
committerLinus Groh <mail@linusgroh.de>2022-01-27 21:16:44 +0000
commit27eda77c9736361f15407c29e5258f635b1cd8d5 (patch)
treecf297c5ba3b4b5e38fcb3fa36d22c8d18e9817c6 /Meta/CMake
parent589e7354fbf10f04c87eae3ffde2e2d2b3029e9a (diff)
downloadserenity-27eda77c9736361f15407c29e5258f635b1cd8d5.zip
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.
Diffstat (limited to 'Meta/CMake')
-rw-r--r--Meta/CMake/unicode_data.cmake17
1 files changed, 17 insertions, 0 deletions
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()