From e483a71247215ca7104353b00114d1abdb6538ba Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 19 Feb 2017 14:02:29 +0100 Subject: cmake/i18n: make lrelease run depending on .ts files --- cmake/opentrack-install.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmake/opentrack-install.cmake b/cmake/opentrack-install.cmake index a9ffce80..844e77f5 100644 --- a/cmake/opentrack-install.cmake +++ b/cmake/opentrack-install.cmake @@ -67,12 +67,14 @@ function(merge_translations) endforeach() if(NOT ts STREQUAL "") - add_custom_target(i18n-lang-${i} ALL - COMMAND "${Qt5_DIR}/../../../bin/lrelease" -nounfinished -silent ${ts} -qm "${qm-output}") + add_custom_command(OUTPUT "${qm-output}" + COMMAND "${Qt5_DIR}/../../../bin/lrelease" -nounfinished -silent ${ts} -qm "${qm-output}" + DEPENDS ${ts} + COMMENT "Running lrelease for ${i}") + add_custom_target(i18n-lang-${i} ALL DEPENDS "${qm-output}") list(APPEND all-deps "i18n-lang-${i}") install(FILES "${qm-output}" DESTINATION "${opentrack-i18n-pfx}" RENAME "${i}.qm" ${opentrack-perms}) else() - #add_custom_target(i18n-lang-${i} DEPENDS ${deps}) message(FATAL_ERROR "build logic error: no translations for language ${i}") endif() endforeach() -- cgit v1.2.3