summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xCMakeLists.txt1
-rw-r--r--cmake/opentrack-boilerplate.cmake5
-rw-r--r--cmake/opentrack-install.cmake7
3 files changed, 10 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e3d12828..1eee42a6 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,6 +30,7 @@ cmake_minimum_required(VERSION 2.8.11)
set_property(GLOBAL PROPERTY opentrack-all-modules "")
set_property(GLOBAL PROPERTY opentrack-all-source-dirs "")
+set_property(GLOBAL PROPERTY opentrack-force-i18n-regen FALSE)
set(opentrack-all-translations nl_NL ru_RU stub)
include(opentrack-policy)
diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake
index cba43409..d9b3b64d 100644
--- a/cmake/opentrack-boilerplate.cmake
+++ b/cmake/opentrack-boilerplate.cmake
@@ -221,9 +221,10 @@ function(opentrack_boilerplate n)
set(langs "")
foreach(i ${opentrack-all-translations})
set(t "${CMAKE_CURRENT_SOURCE_DIR}/lang/${i}.ts")
- if(SDK_REGEN_TRANSLATIONS OR NOT EXISTS "${t}")
- list(APPEND langs "${t}")
+ if (NOT EXISTS "${t}")
+ set_property(GLOBAL PROPERTY opentrack-force-i18n-regen TRUE)
endif()
+ list(APPEND langs "${t}")
get_property(tt GLOBAL PROPERTY "opentrack-ts-${i}")
list(APPEND tt "${t}")
set_property(GLOBAL PROPERTY "opentrack-ts-${i}" "${tt}")
diff --git a/cmake/opentrack-install.cmake b/cmake/opentrack-install.cmake
index 56067f1b..4d6a08f2 100644
--- a/cmake/opentrack-install.cmake
+++ b/cmake/opentrack-install.cmake
@@ -76,6 +76,11 @@ function(merge_translations)
message(FATAL_ERROR "build logic error: no translations for language ${i}")
endif()
endforeach()
- add_custom_target(i18n ALL DEPENDS ${all-deps})
+ set(maybe-all "")
+ get_property(maybe-force-i18n GLOBAL PROPERTY opentrack-force-i18n-regen)
+ if(SDK_REGEN_TRANSLATIONS OR maybe-force-i18n)
+ set(maybe-all ALL)
+ endif()
+ add_custom_target(i18n ${maybe-all} DEPENDS ${all-deps})
endfunction()