summaryrefslogtreecommitdiffstats
path: root/translations/translations.pro
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-11-09 17:43:38 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-11-10 12:57:40 (GMT)
commit5067c64c2356196f2086a97304f1a99309c09d69 (patch)
tree7850ff547ade7f8a1845cda0dd8fdc32ce52d293 /translations/translations.pro
parent006b41c8dd76d6ee33af5459339742fcae2b680f (diff)
downloadQt-5067c64c2356196f2086a97304f1a99309c09d69.zip
Qt-5067c64c2356196f2086a97304f1a99309c09d69.tar.gz
Qt-5067c64c2356196f2086a97304f1a99309c09d69.tar.bz2
make qm file creation a regular build step
this is mostly a revert of the revert of the previous attempt, only that this time we have a bootstrapped lrelease which won't blow up for cross-compilations. Reviewed-By: Jason McDonald Task-Id: QTBUG-4939
Diffstat (limited to 'translations/translations.pro')
-rw-r--r--translations/translations.pro42
1 files changed, 42 insertions, 0 deletions
diff --git a/translations/translations.pro b/translations/translations.pro
new file mode 100644
index 0000000..22f0ace
--- /dev/null
+++ b/translations/translations.pro
@@ -0,0 +1,42 @@
+TRANSLATIONS = $$files(*.ts)
+
+LRELEASE = $$QT_BUILD_TREE/bin/lrelease
+win32:LRELEASE ~= s|/|\\|g
+
+contains(TEMPLATE_PREFIX, vc):vcproj = 1
+
+TEMPLATE = app
+TARGET = qm_phony_target
+CONFIG -= qt separate_debug_info
+QT =
+LIBS =
+
+updateqm.input = TRANSLATIONS
+updateqm.output = ${QMAKE_FILE_BASE}.qm
+isEmpty(vcproj):updateqm.variable_out = PRE_TARGETDEPS
+updateqm.commands = @echo lrelease ${QMAKE_FILE_IN}; $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
+updateqm.name = LRELEASE ${QMAKE_FILE_IN}
+updateqm.CONFIG += no_link
+QMAKE_EXTRA_COMPILERS += updateqm
+
+isEmpty(vcproj) {
+ QMAKE_LINK = @: IGNORE THIS LINE
+ OBJECTS_DIR =
+ win32:CONFIG -= embed_manifest_exe
+} else {
+ CONFIG += console
+ PHONY_DEPS = .
+ phony_src.input = PHONY_DEPS
+ phony_src.output = phony.c
+ phony_src.variable_out = GENERATED_SOURCES
+ phony_src.commands = echo int main() { return 0; } > phony.c
+ phony_src.name = CREATE phony.c
+ phony_src.CONFIG += combine
+ QMAKE_EXTRA_COMPILERS += phony_src
+}
+
+translations.path = $$[QT_INSTALL_TRANSLATIONS]
+translations.files = $$TRANSLATIONS
+translations.files ~= s,\\.ts$,.qm,g
+translations.CONFIG += no_check_exist
+INSTALLS += translations