summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-i18n.cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-03-14 09:21:01 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-03-14 09:21:01 +0100
commit8da1bc08b2ec7b1d3d8ef18a9f459b2ac4c0c2e4 (patch)
tree17af4fd0288c068387e406c4b8f44c35c735215f /cmake/opentrack-i18n.cmake
parentd6342f01959631341cb883048992f80ccda7694e (diff)
cmake/i18n: fix GNU make
Issue: #726 Reported by: Artem Sobolev @ljgdasfhk
Diffstat (limited to 'cmake/opentrack-i18n.cmake')
-rw-r--r--cmake/opentrack-i18n.cmake12
1 files changed, 11 insertions, 1 deletions
diff --git a/cmake/opentrack-i18n.cmake b/cmake/opentrack-i18n.cmake
index bc468e8a..34d1a3c3 100644
--- a/cmake/opentrack-i18n.cmake
+++ b/cmake/opentrack-i18n.cmake
@@ -27,6 +27,7 @@ function(otr_i18n_for_target_directory n)
set(target-name "i18n-lang-${i}-module-${n}")
add_custom_target(${target-name} DEPENDS "${t2}")
set_property(GLOBAL APPEND PROPERTY "opentrack-ts-files-${i}" "${t2}")
+ set_property(GLOBAL APPEND PROPERTY "opentrack-ts-module-${n}" "${target-name}")
endforeach()
endfunction()
@@ -42,6 +43,15 @@ function(otr_merge_translations)
set(all-qm-files "")
+ get_property(all-modules GLOBAL PROPERTY opentrack-all-modules)
+
+ set(all-ts-targets "")
+
+ foreach(target ${all-modules})
+ get_property(ts-targets GLOBAL PROPERTY "opentrack-ts-module-${target}")
+ list(APPEND all-ts-targets "${ts-targets}")
+ endforeach()
+
foreach(i ${opentrack_all-translations})
get_property(ts-files GLOBAL PROPERTY "opentrack-ts-files-${i}")
get_property(lrelease-binary TARGET "${Qt5_LRELEASE_EXECUTABLE}" PROPERTY IMPORTED_LOCATION)
@@ -51,7 +61,7 @@ function(otr_merge_translations)
add_custom_command(OUTPUT "${qm-output}"
COMMAND "${lrelease-binary}" -nounfinished -silent ${ts-files} -qm "${qm-output}"
- DEPENDS ${ts-files}
+ DEPENDS ${all-ts-targets}
COMMENT "Running lrelease for ${i}")
install(FILES "${qm-output}"