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

Signed-off-by: Mihai Moldovan <[email protected]>
---
 x2goclient.pro |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)


diff --git a/x2goclient.pro b/x2goclient.pro
index e9b3599..e862a07 100755
--- a/x2goclient.pro
+++ b/x2goclient.pro
@@ -113,6 +113,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 += .

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

_______________________________________________
X2Go-Dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/x2go-dev

Reply via email to