Skip to content

Commit ffd8060

Browse files
committed
Speed up build in Qt creator in common case
- Generate *.qm only when needed (and when qmake is run), this avoids a long qrc compile and link step every time - Generate build.h every time, but only trigger link when it changed (like makefile.unix)
1 parent 661834d commit ffd8060

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

bitcoin-qt.pro

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) {
8484
!windows || contains(USE_BUILD_INFO, 1) {
8585
genbuild.depends = FORCE
8686
genbuild.commands = cd $$PWD; share/genbuild.sh $$OUT_PWD/build/build.h
87-
genbuild.target = genbuildhook
88-
PRE_TARGETDEPS += genbuildhook
87+
genbuild.target = $$OUT_PWD/build/build.h
88+
PRE_TARGETDEPS += $$OUT_PWD/build/build.h
8989
QMAKE_EXTRA_TARGETS += genbuild
9090
DEFINES += HAVE_BUILD_INFO
9191
}
@@ -259,15 +259,14 @@ isEmpty(QMAKE_LRELEASE) {
259259
win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
260260
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
261261
}
262-
isEmpty(TS_DIR):TS_DIR = src/qt/locale
262+
isEmpty(QM_DIR):QM_DIR = $$PWD/src/qt/locale
263263
# automatically build translations, so they can be included in resource file
264264
TSQM.name = lrelease ${QMAKE_FILE_IN}
265265
TSQM.input = TRANSLATIONS
266-
TSQM.output = $$TS_DIR/${QMAKE_FILE_BASE}.qm
267-
TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN}
266+
TSQM.output = $$QM_DIR/${QMAKE_FILE_BASE}.qm
267+
TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
268268
TSQM.CONFIG = no_link
269269
QMAKE_EXTRA_COMPILERS += TSQM
270-
PRE_TARGETDEPS += compiler_TSQM_make_all
271270

272271
# "Other files" to show in Qt Creator
273272
OTHER_FILES += \

0 commit comments

Comments
 (0)