summaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-02-19 14:02:29 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-02-19 14:02:29 +0100
commite483a71247215ca7104353b00114d1abdb6538ba (patch)
tree2d0015ab24e272de1dbdfe6bd6a3e31c05a7cd0f /cmake
parentf6d885af59026f4e952084eac7c3e36acef1ca52 (diff)
cmake/i18n: make lrelease run depending on .ts files
Diffstat (limited to 'cmake')
-rw-r--r--cmake/opentrack-install.cmake8
1 files 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()