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.
This commit is contained in:
Hennadii Stepanov 2024-11-24 15:14:14 +00:00
parent 2638fdb4f9
commit 6f4128e3a8
No known key found for this signature in database
GPG key ID: 410108112E7EA81F
2 changed files with 3 additions and 0 deletions

View file

@ -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)

View file

@ -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