summaryrefslogtreecommitdiffstats
path: root/translations/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-04 09:43:55 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-04 09:43:55 -0700
commitf1d8a2374b45eb7ff457864c9b96c77ac85ed7c3 (patch)
tree5e8def1dfcb9b1fd2bcf45ebcc0627333c227a3d /translations/CMakeLists.txt
parentdc0f0ff204fc759928815d5d0befe50be9391aea (diff)
downloadsubsurface-f1d8a2374b45eb7ff457864c9b96c77ac85ed7c3.tar.gz
Cmake: enable updates for ts files
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'translations/CMakeLists.txt')
-rw-r--r--translations/CMakeLists.txt22
1 files changed, 15 insertions, 7 deletions
diff --git a/translations/CMakeLists.txt b/translations/CMakeLists.txt
index 71ffa6d39..08b80e4dc 100644
--- a/translations/CMakeLists.txt
+++ b/translations/CMakeLists.txt
@@ -1,4 +1,9 @@
-QT5_ADD_TRANSLATION(TRANSLATIONS
+# without this a "make clean" would delete the .ts files
+set_directory_properties(PROPERTIES CLEAN_NO_CUSTOM 1)
+
+# active translations - these will be built
+#
+set(TRANSLATION_FILES
subsurface_source.ts
subsurface_bg_BG.ts
subsurface_cs.ts
@@ -25,10 +30,13 @@ QT5_ADD_TRANSLATION(TRANSLATIONS
)
# disabled translations as they are below 50%:
-# translations/subsurface_el_GR.ts \
-# translations/subsurface_he.ts \
-# translations/subsurface_hu.ts \
-# translations/subsurface_ro_RO.ts \
+# subsurface_el_GR.ts
+# subsurface_he.ts
+# subsurface_hu.ts
+# subsurface_ro_RO.ts
-SET(TRANSLATIONS ${TRANSLATIONS} PARENT_SCOPE)
-ADD_CUSTOM_TARGET (translations ALL DEPENDS ${TRANSLATIONS})
+set(TRANSLATIONS ${TRANSLATIONS} PARENT_SCOPE)
+qt5_create_translation(TRANSLATION_MESSAGES ${CMAKE_SOURCE_DIR} ${TRANSLATION_FILES})
+qt5_add_translation(TRANSLATIONS ${TRANSLATION_FILES})
+add_custom_target (translations ALL DEPENDS ${TRANSLATIONS})
+add_custom_target(translations_update DEPENDS ${TRANSLATION_MESSAGES})