summaryrefslogtreecommitdiff
path: root/Meta/CMake
diff options
context:
space:
mode:
Diffstat (limited to 'Meta/CMake')
-rw-r--r--Meta/CMake/unicode_data.cmake28
1 files changed, 27 insertions, 1 deletions
diff --git a/Meta/CMake/unicode_data.cmake b/Meta/CMake/unicode_data.cmake
index c4a0880ebe..123fbfb7f0 100644
--- a/Meta/CMake/unicode_data.cmake
+++ b/Meta/CMake/unicode_data.cmake
@@ -126,6 +126,9 @@ if (ENABLE_UNICODE_DATABASE_DOWNLOAD)
set(UNICODE_LOCALE_HEADER LibUnicode/UnicodeLocale.h)
set(UNICODE_LOCALE_IMPLEMENTATION LibUnicode/UnicodeLocale.cpp)
+ set(UNICODE_NUMBER_FORMAT_HEADER LibUnicode/UnicodeNumberFormat.h)
+ set(UNICODE_NUMBER_FORMAT_IMPLEMENTATION LibUnicode/UnicodeNumberFormat.cpp)
+
set(UNICODE_META_TARGET_PREFIX LibUnicode_)
if (CMAKE_CURRENT_BINARY_DIR MATCHES ".*/LibUnicode") # Serenity build.
@@ -134,6 +137,10 @@ if (ENABLE_UNICODE_DATABASE_DOWNLOAD)
set(UNICODE_LOCALE_HEADER UnicodeLocale.h)
set(UNICODE_LOCALE_IMPLEMENTATION UnicodeLocale.cpp)
+
+ set(UNICODE_NUMBER_FORMAT_HEADER UnicodeNumberFormat.h)
+ set(UNICODE_NUMBER_FORMAT_IMPLEMENTATION UnicodeNumberFormat.cpp)
+
set(UNICODE_META_TARGET_PREFIX "")
endif()
@@ -161,5 +168,24 @@ if (ENABLE_UNICODE_DATABASE_DOWNLOAD)
add_custom_target(generate_${UNICODE_META_TARGET_PREFIX}UnicodeLocale DEPENDS ${UNICODE_LOCALE_HEADER} ${UNICODE_LOCALE_IMPLEMENTATION})
add_dependencies(all_generated generate_${UNICODE_META_TARGET_PREFIX}UnicodeLocale)
- set(UNICODE_DATA_SOURCES ${UNICODE_DATA_HEADER} ${UNICODE_DATA_IMPLEMENTATION} ${UNICODE_LOCALE_HEADER} ${UNICODE_LOCALE_IMPLEMENTATION})
+ add_custom_command(
+ OUTPUT ${UNICODE_NUMBER_FORMAT_HEADER} ${UNICODE_NUMBER_FORMAT_IMPLEMENTATION}
+ COMMAND $<TARGET_FILE:Lagom::GenerateUnicodeNumberFormat> -h ${UNICODE_NUMBER_FORMAT_HEADER}.tmp -c ${UNICODE_NUMBER_FORMAT_IMPLEMENTATION}.tmp -n ${CLDR_NUMBERS_PATH}
+ COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${UNICODE_NUMBER_FORMAT_HEADER}.tmp ${UNICODE_NUMBER_FORMAT_HEADER}
+ COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${UNICODE_NUMBER_FORMAT_IMPLEMENTATION}.tmp ${UNICODE_NUMBER_FORMAT_IMPLEMENTATION}
+ COMMAND "${CMAKE_COMMAND}" -E remove ${UNICODE_NUMBER_FORMAT_HEADER}.tmp ${UNICODE_NUMBER_FORMAT_IMPLEMENTATION}.tmp
+ VERBATIM
+ DEPENDS Lagom::GenerateUnicodeNumberFormat ${CLDR_CORE_PATH} ${CLDR_LOCALES_PATH} ${CLDR_MISC_PATH} ${CLDR_NUMBERS_PATH}
+ )
+ add_custom_target(generate_${UNICODE_META_TARGET_PREFIX}UnicodeNumberFormat DEPENDS ${UNICODE_NUMBER_FORMAT_HEADER} ${UNICODE_NUMBER_FORMAT_IMPLEMENTATION})
+ add_dependencies(all_generated generate_${UNICODE_META_TARGET_PREFIX}UnicodeNumberFormat)
+
+ set(UNICODE_DATA_SOURCES
+ ${UNICODE_DATA_HEADER}
+ ${UNICODE_DATA_IMPLEMENTATION}
+ ${UNICODE_LOCALE_HEADER}
+ ${UNICODE_LOCALE_IMPLEMENTATION}
+ ${UNICODE_NUMBER_FORMAT_HEADER}
+ ${UNICODE_NUMBER_FORMAT_IMPLEMENTATION}
+ )
endif()