Improve Cmake target for translations. Still not perfect.

This commit is contained in:
Mario Hüttel 2019-11-12 19:50:34 +01:00
parent f8de3468de
commit 58a0bd85c4
1 changed files with 16 additions and 4 deletions

View File

@ -1,4 +1,16 @@
add_custom_target(translations ALL
COMMAND ./generate-mo.sh "${PROJECT_BINARY_DIR}/translations/output"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Generating translation locales")
add_custom_target(translations
DEPENDS
"${PROJECT_BINARY_DIR}/translations/output/"
)
add_custom_command(DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/pot/po/*"
OUTPUT
"${PROJECT_BINARY_DIR}/translations/output/"
COMMAND
COMMAND ./generate-mo.sh "${PROJECT_BINARY_DIR}/translations/output"
WORKING_DIRECTORY
${CMAKE_CURRENT_SOURCE_DIR}
COMMENT
"Generating translation locales"
)