summaryrefslogtreecommitdiff
path: root/Meta/CMake
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-09-07 13:39:31 -0400
committerLinus Groh <mail@linusgroh.de>2022-09-08 23:12:31 +0100
commitb61eca0a1e401202e8315629c3d87158381c9518 (patch)
treedda2f0ef4e7938707652e2d24b72510ecdfbb467 /Meta/CMake
parentfff79379d4270ece49cce85e67d09f0e5ab7315d (diff)
downloadserenity-b61eca0a1e401202e8315629c3d87158381c9518.zip
LibUncode: Parse and generate emoji code point data
According to TR #51, the "best definition of the full set [of emojis] is in the emoji-test.txt file". This defines not only the emoji themselves, but the order in which they should be displayed, and what "group" of emojis they belong to.
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 88e9a9b64e..2751035068 100644
--- a/Meta/CMake/unicode_data.cmake
+++ b/Meta/CMake/unicode_data.cmake
@@ -92,12 +92,18 @@ if (ENABLE_UNICODE_DATABASE_DOWNLOAD)
set(UNICODE_DATA_HEADER LibUnicode/UnicodeData.h)
set(UNICODE_DATA_IMPLEMENTATION LibUnicode/UnicodeData.cpp)
+ set(EMOJI_DATA_HEADER LibUnicode/EmojiData.h)
+ set(EMOJI_DATA_IMPLEMENTATION LibUnicode/EmojiData.cpp)
+
set(UNICODE_META_TARGET_PREFIX LibUnicode_)
if (CMAKE_CURRENT_BINARY_DIR MATCHES ".*/LibUnicode") # Serenity build.
set(UNICODE_DATA_HEADER UnicodeData.h)
set(UNICODE_DATA_IMPLEMENTATION UnicodeData.cpp)
+ set(EMOJI_DATA_HEADER EmojiData.h)
+ set(EMOJI_DATA_IMPLEMENTATION EmojiData.cpp)
+
set(UNICODE_META_TARGET_PREFIX "")
endif()
@@ -110,6 +116,15 @@ if (ENABLE_UNICODE_DATABASE_DOWNLOAD)
"${UNICODE_DATA_IMPLEMENTATION}"
arguments -u "${UNICODE_DATA_PATH}" -s "${SPECIAL_CASING_PATH}" -g "${DERIVED_GENERAL_CATEGORY_PATH}" -p "${PROP_LIST_PATH}" -d "${DERIVED_CORE_PROP_PATH}" -b "${DERIVED_BINARY_PROP_PATH}" -a "${PROP_ALIAS_PATH}" -v "${PROP_VALUE_ALIAS_PATH}" -r "${SCRIPTS_PATH}" -x "${SCRIPT_EXTENSIONS_PATH}" -k "${BLOCKS_PATH}" -e "${EMOJI_DATA_PATH}" -m "${NAME_ALIAS_PATH}" -n "${NORM_PROPS_PATH}" -f "${GRAPHEME_BREAK_PROP_PATH}" -w "${WORD_BREAK_PROP_PATH}" -i "${SENTENCE_BREAK_PROP_PATH}"
)
+ invoke_generator(
+ "EmojiData"
+ Lagom::GenerateEmojiData
+ "${UCD_VERSION_FILE}"
+ "${UNICODE_META_TARGET_PREFIX}"
+ "${EMOJI_DATA_HEADER}"
+ "${EMOJI_DATA_IMPLEMENTATION}"
+ arguments -e "${EMOJI_TEST_PATH}"
+ )
if (CMAKE_CURRENT_BINARY_DIR MATCHES ".*/LibUnicode") # Serenity build.
add_custom_command(
@@ -128,5 +143,7 @@ if (ENABLE_UNICODE_DATABASE_DOWNLOAD)
set(UNICODE_DATA_SOURCES
${UNICODE_DATA_HEADER}
${UNICODE_DATA_IMPLEMENTATION}
+ ${EMOJI_DATA_HEADER}
+ ${EMOJI_DATA_IMPLEMENTATION}
)
endif()