automaticaly build language files

This commit is contained in:
mrbesen 2022-04-20 19:26:28 +02:00
parent 7d15768295
commit 5164e6adfb
Signed by untrusted user: MrBesen
GPG Key ID: 596B2350DCD67504
2 changed files with 22 additions and 4 deletions

1
.gitignore vendored
View File

@ -21,3 +21,4 @@ ui/*.h
.qmake.stash
*.pro.user
*.qm
Makefile

View File

@ -16,6 +16,12 @@ DEFINES += QT_DEPRECATED_WARNINGS
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
# parameters: var, prepend, append
defineReplace(prependAll) {
for(a,$$1):result += $$2$${a}$$3
return($$result)
}
SOURCES += \
src/fakescreen.cpp \
src/lolautoaccept.cpp \
@ -46,15 +52,26 @@ OBJECTS_DIR = build/
FORMS += \
ui/mainwindow.ui
TRANSLATIONS += \
ts/de_DE.ts \
ts/en.ts
INCLUDEPATH += $$PWD/include/ \
$$PWD/thirdparty/Log/ \
/usr/include/opencv4/opencv \
/usr/include/opencv4
#TRANSLATIONS += \
# ts/de_DE.ts \
# ts/en.ts
LANGUAGES = de_DE en
TRANSLATIONS = $$prependAll(LANGUAGES, $$PWD/ts/, .ts)
TRANSLATIONSQM = $$prependAll(LANGUAGES, $$PWD/ts/, .qm)
makelang.commands = lrelease $$_PRO_FILE_
QMAKE_EXTRA_TARGETS += makelang
PRE_TARGETDEPS += makelang
QMAKE_CLEAN += $$TRANSLATIONSQM
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin