summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-08-23 08:51:28 -0400
committerLinus Groh <mail@linusgroh.de>2022-08-23 19:03:43 +0100
commit2e0b20ef0141bd2776890d63ca8304976e0c468d (patch)
tree5a5d9511e9dc558962e9420803949cf828d56607
parent6dd81610025171fbcc1452e9f9fcf5747cf8db38 (diff)
downloadserenity-2e0b20ef0141bd2776890d63ca8304976e0c468d.zip
Meta: Only run the emoji generator for Serenity builds
It is not needed on Lagom, and was incidentally run twice.
-rw-r--r--Meta/CMake/unicode_data.cmake24
1 files changed, 13 insertions, 11 deletions
diff --git a/Meta/CMake/unicode_data.cmake b/Meta/CMake/unicode_data.cmake
index 758d7a2412..03a0a63bca 100644
--- a/Meta/CMake/unicode_data.cmake
+++ b/Meta/CMake/unicode_data.cmake
@@ -235,17 +235,19 @@ if (ENABLE_UNICODE_DATABASE_DOWNLOAD)
arguments -d "${CLDR_DATES_PATH}"
)
- add_custom_command(
- OUTPUT "${EMOJI_INSTALL_PATH}"
- COMMAND "${EMOJI_GENERATOR_PATH}" "${EMOJI_TEST_PATH}" "${EMOJI_RES_PATH}" "${EMOJI_INSTALL_PATH}"
- # This will make this command only run when the modified time of the directory changes,
- # which only happens if files within it are added or deleted, but not when a file is modified.
- # This is fine for this use-case, because the contents of a file changing should not affect
- # the generated emoji.txt file.
- DEPENDS "${EMOJI_GENERATOR_PATH}" "${EMOJI_RES_PATH}" "${EMOJI_TEST_PATH}"
- USES_TERMINAL
- )
- add_custom_target(generate_emoji_txt ALL DEPENDS "${EMOJI_INSTALL_PATH}")
+ if (CMAKE_CURRENT_BINARY_DIR MATCHES ".*/LibUnicode") # Serenity build.
+ add_custom_command(
+ OUTPUT "${EMOJI_INSTALL_PATH}"
+ COMMAND "${EMOJI_GENERATOR_PATH}" "${EMOJI_TEST_PATH}" "${EMOJI_RES_PATH}" "${EMOJI_INSTALL_PATH}"
+ # This will make this command only run when the modified time of the directory changes,
+ # which only happens if files within it are added or deleted, but not when a file is modified.
+ # This is fine for this use-case, because the contents of a file changing should not affect
+ # the generated emoji.txt file.
+ DEPENDS "${EMOJI_GENERATOR_PATH}" "${EMOJI_RES_PATH}" "${EMOJI_TEST_PATH}"
+ USES_TERMINAL
+ )
+ add_custom_target(generate_emoji_txt ALL DEPENDS "${EMOJI_INSTALL_PATH}")
+ endif()
set(UNICODE_DATA_SOURCES
${UNICODE_DATA_HEADER}