Skip to content

Commit 6f4128e

Browse files
committed
cmake, qt: Use absolute paths for includes in MOC-generated files
This change resolves build issues that occur when the source or build directory is symlinked.
1 parent 2638fdb commit 6f4128e

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/qt/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ endfunction()
3535
# - https://doc.qt.io/qt-5/cmake-manual.html
3636

3737
set(CMAKE_AUTOMOC ON)
38+
set(CMAKE_AUTOMOC_MOC_OPTIONS "-p${CMAKE_CURRENT_SOURCE_DIR}")
3839
set(CMAKE_AUTORCC ON)
3940
set(CMAKE_AUTOUIC ON)
4041
set(CMAKE_AUTOUIC_SEARCH_PATHS forms)

src/qt/test/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# Distributed under the MIT software license, see the accompanying
33
# file COPYING or https://opensource.org/license/mit/.
44

5+
set(CMAKE_AUTOMOC_MOC_OPTIONS "-p${CMAKE_CURRENT_SOURCE_DIR}")
6+
57
add_executable(test_bitcoin-qt
68
apptests.cpp
79
optiontests.cpp

0 commit comments

Comments
 (0)