Skip to content

Commit

Permalink
cmake, qt: Use absolute paths for includes in MOC-generated files
Browse files Browse the repository at this point in the history
This change resolves build issues that occur when the source or build
directory is symlinked.
  • Loading branch information
hebasto committed Nov 24, 2024
1 parent 2638fdb commit 6f4128e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/qt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ endfunction()
# - https://doc.qt.io/qt-5/cmake-manual.html

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOMOC_MOC_OPTIONS "-p${CMAKE_CURRENT_SOURCE_DIR}")
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOUIC_SEARCH_PATHS forms)
Expand Down
2 changes: 2 additions & 0 deletions src/qt/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://opensource.org/license/mit/.

set(CMAKE_AUTOMOC_MOC_OPTIONS "-p${CMAKE_CURRENT_SOURCE_DIR}")

add_executable(test_bitcoin-qt
apptests.cpp
optiontests.cpp
Expand Down

0 comments on commit 6f4128e

Please sign in to comment.