Automatically build the required x2goclient_*.qm files based on the
x2goclient_*.ts translation files.

Signed-off-by: Mihai Moldovan <io...@ionic.de>
---
 x2goclient.pro |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/x2goclient.pro b/x2goclient.pro
index 2bb7cdc..1d58d64 100755
--- a/x2goclient.pro
+++ b/x2goclient.pro
@@ -105,6 +105,24 @@ else {
     message(if you want to build x2goplugin you should export
X2GO_CLIENT_TARGET=plugin)
 }
 
+!isEmpty(TRANSLATIONS) {
+  isEmpty(QMAKE_LRELEASE) {
+    win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
+    else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
+  }
+
+  isEmpty(TS_DIR):TS_DIR = .
+
+  TSQM.name = lrelease ${QMAKE_FILE_IN}
+  TSQM.input = TRANSLATIONS
+  TSQM.output = $$TS_DIR/${QMAKE_FILE_BASE}.qm
+  TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN}
+  TSQM.CONFIG = no_link
+  QMAKE_EXTRA_COMPILERS += TSQM
+  PRE_TARGETDEPS += compiler_TSQM_make_all
+}
+else:message(No translation files in project)
+
 TEMPLATE = app
 DEPENDPATH += .
 INCLUDEPATH += .
-- 
1.7.9


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
X2Go-Dev mailing list
X2Go-Dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/x2go-dev

Reply via email to