+! Add proper .qm generation in .pro file.

This commit is contained in:
Konstantin Isakov 2009-05-03 10:18:50 +00:00
parent 11fcd6fb1b
commit da3b7c819c
2 changed files with 20 additions and 1 deletions

View file

@ -31,14 +31,17 @@ win32 {
INCLUDEPATH += winlibs/include INCLUDEPATH += winlibs/include
LIBS += -Lwinlibs/lib LIBS += -Lwinlibs/lib
} }
unix { unix {
LIBS += -lXtst LIBS += -lXtst
PREFIX = $$(PREFIX) PREFIX = $$(PREFIX)
isEmpty( PREFIX ):PREFIX = /usr/local isEmpty( PREFIX ):PREFIX = /usr/local
DEFINES += PROGRAM_DATA_DIR=\\\"$$PREFIX/share/apps/goldendict/\\\" DEFINES += PROGRAM_DATA_DIR=\\\"$$PREFIX/share/apps/goldendict/\\\"
target.path = $$PREFIX/bin/ target.path = $$PREFIX/bin/
locale.path = $$PREFIX/share/apps/goldendict/locale/ locale.path = $$PREFIX/share/apps/goldendict/locale/
locale.files = locale/ru.qm locale.files = locale/*.qm
INSTALLS += target \ INSTALLS += target \
locale locale
@ -185,8 +188,24 @@ win32 {
} }
RESOURCES += resources.qrc \ RESOURCES += resources.qrc \
flags.qrc flags.qrc
TRANSLATIONS += locale/ru.ts TRANSLATIONS += locale/ru.ts
# This makes qmake generate translations
isEmpty(QMAKE_LRELEASE):QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
TS_OUT = $$TRANSLATIONS
TS_OUT~=s/.ts/.qm
TSQM.name = lrelease ${QMAKE_FILE_IN}
TSQM.input = TRANSLATIONS
TSQM.output = $$TS_OUT
TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN}
TSQM.CONFIG = no_link
QMAKE_EXTRA_COMPILERS += TSQM
PRE_TARGETDEPS += $$TS_OUT
# LibZip # LibZip
SOURCES += \ SOURCES += \

Binary file not shown.