1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 00:17:36 +00:00

Meta: Only run the emoji generator for Serenity builds

It is not needed on Lagom, and was incidentally run twice.
This commit is contained in:
Timothy Flynn 2022-08-23 08:51:28 -04:00 committed by Linus Groh
parent 6dd8161002
commit 2e0b20ef01

View file

@ -235,17 +235,19 @@ if (ENABLE_UNICODE_DATABASE_DOWNLOAD)
arguments -d "${CLDR_DATES_PATH}" arguments -d "${CLDR_DATES_PATH}"
) )
add_custom_command( if (CMAKE_CURRENT_BINARY_DIR MATCHES ".*/LibUnicode") # Serenity build.
OUTPUT "${EMOJI_INSTALL_PATH}" add_custom_command(
COMMAND "${EMOJI_GENERATOR_PATH}" "${EMOJI_TEST_PATH}" "${EMOJI_RES_PATH}" "${EMOJI_INSTALL_PATH}" OUTPUT "${EMOJI_INSTALL_PATH}"
# This will make this command only run when the modified time of the directory changes, COMMAND "${EMOJI_GENERATOR_PATH}" "${EMOJI_TEST_PATH}" "${EMOJI_RES_PATH}" "${EMOJI_INSTALL_PATH}"
# which only happens if files within it are added or deleted, but not when a file is modified. # This will make this command only run when the modified time of the directory changes,
# This is fine for this use-case, because the contents of a file changing should not affect # which only happens if files within it are added or deleted, but not when a file is modified.
# the generated emoji.txt file. # This is fine for this use-case, because the contents of a file changing should not affect
DEPENDS "${EMOJI_GENERATOR_PATH}" "${EMOJI_RES_PATH}" "${EMOJI_TEST_PATH}" # the generated emoji.txt file.
USES_TERMINAL DEPENDS "${EMOJI_GENERATOR_PATH}" "${EMOJI_RES_PATH}" "${EMOJI_TEST_PATH}"
) USES_TERMINAL
add_custom_target(generate_emoji_txt ALL DEPENDS "${EMOJI_INSTALL_PATH}") )
add_custom_target(generate_emoji_txt ALL DEPENDS "${EMOJI_INSTALL_PATH}")
endif()
set(UNICODE_DATA_SOURCES set(UNICODE_DATA_SOURCES
${UNICODE_DATA_HEADER} ${UNICODE_DATA_HEADER}