Skip to content

Commit f59dceb

Browse files
committed
qt: Fix out-of-tree GUI builds
Without this patch: - When I compile the GUI from the bitcoin directory itself, it works as expected. - When I build the GUI in an out-of-tree build, I cannot get it to select tabs. When I click, say the "Receive" tab nothing happens, the button selects but it doesn't switch the page. The rest - even the debug window - seems to work. See full discussion here: bitcoin#7911 (comment) This turned out to be caused by a mismatch in the arguments to moc, preventing it from finding `bitcoin-config.h`. Fix this by passing `$(DEFAULT_INCLUDES)` to it, which gets set to the appropriate path by autoconf itself.
1 parent 351abf9 commit f59dceb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Makefile.qt.include

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,11 +424,11 @@ ui_%.h: %.ui
424424
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(UIC) -o $@ $< || (echo "Error creating $@"; false)
425425

426426
%.moc: %.cpp
427-
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) $< | \
427+
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(MOC) $(DEFAULT_INCLUDES) $(QT_INCLUDES) $(MOC_DEFS) $< | \
428428
$(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@
429429

430430
moc_%.cpp: %.h
431-
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) $< | \
431+
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(MOC) $(DEFAULT_INCLUDES) $(QT_INCLUDES) $(MOC_DEFS) $< | \
432432
$(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@
433433

434434
%.qm: %.ts

0 commit comments

Comments
 (0)