Allow make to compile translations before building

Fixes #388.
This commit is contained in:
Gareth Coco
2012-12-20 10:26:10 +00:00
committed by Mark Liversedge
parent a6de662ed7
commit e222bd90eb
10 changed files with 24 additions and 0 deletions

View File

@@ -13,6 +13,11 @@
#CONFIG += console
#QMAKE_LFLAGS = -mwindows
# To compile translation you need QT tool - lrelease
# If it is not found using he defaults in src/src.pro
# then set the full path and filename here.
#QMAKE_LRELEASE = /usr/bin/lrelease
# We use g++ on all platforms so switch on auto vectorization amongst other
# things to speed up looping over ride file points
#QMAKE_CXXFLAGS += -O3

View File

@@ -599,6 +599,25 @@ TRANSLATIONS = translations/gc_fr.ts \
translations/gc_pt.ts \
translations/gc_ru.ts
!isEmpty(TRANSLATIONS) {
isEmpty(QMAKE_LRELEASE) {
win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
unix:!macx {QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease-qt4 }
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
}
isEmpty(TS_DIR):TS_DIR = translations
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)
OTHER_FILES += \
web/Rider.js \
web/ride.js \

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.