|
1 include(../staticconfig.pri) |
|
2 |
|
3 #most of this is shamelessly copied from Qt |
|
4 |
|
5 include(translations.pri) # for "make lupdate" rule |
|
6 |
|
7 TRANSLATIONS = $$files(*.ts) |
|
8 |
|
9 qtPrepareTool(LRELEASE, lrelease) |
|
10 |
|
11 contains(TEMPLATE_PREFIX, vc):vcproj = 1 |
|
12 |
|
13 TEMPLATE = app |
|
14 TARGET = qm_phony_target |
|
15 CONFIG -= qt separate_debug_info sis_targets |
|
16 CONFIG += no_icon |
|
17 QT = |
|
18 LIBS = |
|
19 |
|
20 updateqm.input = TRANSLATIONS |
|
21 updateqm.output = ${QMAKE_FILE_BASE}.qm |
|
22 isEmpty(vcproj):updateqm.variable_out = PRE_TARGETDEPS |
|
23 updateqm.commands = $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT} |
|
24 silent:updateqm.commands = @echo lrelease ${QMAKE_FILE_IN} && $$updateqm.commands |
|
25 updateqm.name = LRELEASE ${QMAKE_FILE_IN} |
|
26 updateqm.CONFIG += no_link |
|
27 QMAKE_EXTRA_COMPILERS += updateqm |
|
28 |
|
29 isEmpty(vcproj) { |
|
30 QMAKE_LINK = @: IGNORE THIS LINE |
|
31 OBJECTS_DIR = |
|
32 win32:CONFIG -= embed_manifest_exe |
|
33 } else { |
|
34 CONFIG += console |
|
35 PHONY_DEPS = . |
|
36 phony_src.input = PHONY_DEPS |
|
37 phony_src.output = phony.c |
|
38 phony_src.variable_out = GENERATED_SOURCES |
|
39 phony_src.commands = echo int main() { return 0; } > phony.c |
|
40 phony_src.name = CREATE phony.c |
|
41 phony_src.CONFIG += combine |
|
42 QMAKE_EXTRA_COMPILERS += phony_src |
|
43 } |
|
44 |
|
45 translations.path = $${QT_MOBILITY_PREFIX}/translations |
|
46 translations.files = $$TRANSLATIONS |
|
47 translations.files ~= s,\\.ts$,.qm,g |
|
48 translations.files ~= s,^,$$OUT_PWD/,g |
|
49 translations.CONFIG += no_check_exist |
|
50 INSTALLS += translations |