diff options
author | Timothy Flynn <trflynn89@pm.me> | 2021-11-12 09:09:48 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-11-12 20:46:38 +0000 |
commit | 1f2ac0ab4104270aa87d6a69b11b1396abf25612 (patch) | |
tree | f63e7685145d545e32b5979853609ec4ba85b818 /Meta/CMake | |
parent | 04e6b43f0558b6d0e00d097055b49a9ade6f6a53 (diff) | |
download | serenity-1f2ac0ab4104270aa87d6a69b11b1396abf25612.zip |
LibUnicode: Move number formatting code generator to UnicodeNumberFormat
Diffstat (limited to 'Meta/CMake')
-rw-r--r-- | Meta/CMake/unicode_data.cmake | 28 |
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() |