Commit 382ec11e authored by Oswald Buddenhagen's avatar Oswald Buddenhagen

add ts and qm build targets

this is based on patches from axasia, which are in turn an almost
literal copy from qt.
parent d75c5fa2
......@@ -12,6 +12,7 @@
*.so
*_pch.h.cpp
*_resource.rc
*.qm
.#*
*.*#
core
......
......@@ -11,3 +11,11 @@ TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS = src
# for Qt Creator translations
QTC_BUILD_ROOT = $$PWD
QTC_INSTALL_TRANSLATIONS = $$PWD/translations
include(translations/translations.pri)
translations.path = $$QTC_INSTALL_TRANSLATIONS
translations.files = $$QTC_INSTALL_TRANSLATIONS/*.qm
defineReplace(prependAll) {
prepend = $$1
arglist = $$2
append = $$3
for(a,arglist) {
result += $${prepend}$${a}$${append}
}
return ($$result)
}
defineReplace(fixPath) {
WIN {
return ($$replace($$1, /, \))
} ELSE {
return ($$1)
}
}
LUPDATE = $$fixPath($$[QT_INSTALL_PREFIX]/bin/lupdate) -locations relative -no-ui-lines
LRELEASE = $$fixPath($$[QT_INSTALL_PREFIX]/bin/lrelease)
###### Qt Creator
QTC_TS = de fr zh_CN untranslated ar es iw ja_JP pl pt ru sk sv uk zh_TW
ts.commands = (cd $$QTC_BUILD_ROOT && \
$$LUPDATE share src \
-ts $$prependAll($$QTC_INSTALL_TRANSLATIONS/qtcreator_,$$QTC_TS,.ts))
qm.commands = $$LRELEASE $$prependAll($$QTC_INSTALL_TRANSLATIONS/qtcreator_,$$QTC_TS,.ts)
QMAKE_EXTRA_TARGETS += ts qm
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment