Skip to content

Commit aabc5ca

Browse files
hebastofanquake
authored andcommitted
cmake: Switch from AUTORCC to qt6_add_resources
This change provides finer control over the compilation of RCC-generated files.
1 parent 25ae14c commit aabc5ca

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/qt/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,13 @@ endfunction()
5050

5151
set(CMAKE_AUTOMOC ON)
5252
set(CMAKE_AUTOMOC_MOC_OPTIONS "-p${CMAKE_CURRENT_SOURCE_DIR}")
53-
set(CMAKE_AUTORCC ON)
5453
set(CMAKE_AUTOUIC ON)
5554
set(CMAKE_AUTOUIC_SEARCH_PATHS forms)
5655

56+
set(CMAKE_AUTORCC OFF)
5757
configure_file(bitcoin_locale.qrc bitcoin_locale.qrc USE_SOURCE_PERMISSIONS COPYONLY)
58+
qt6_add_resources(BITCOIN_QRC bitcoin.qrc)
59+
qt6_add_resources(BITCOIN_LOCALE_QRC ${CMAKE_CURRENT_BINARY_DIR}/bitcoin_locale.qrc)
5860

5961
# The bitcoinqt sources have to include headers in
6062
# order to parse them to collect translatable strings.
@@ -119,8 +121,8 @@ add_library(bitcoinqt STATIC EXCLUDE_FROM_ALL
119121
utilitydialog.h
120122
$<$<PLATFORM_ID:Windows>:winshutdownmonitor.cpp>
121123
$<$<PLATFORM_ID:Windows>:winshutdownmonitor.h>
122-
bitcoin.qrc
123-
${CMAKE_CURRENT_BINARY_DIR}/bitcoin_locale.qrc
124+
${BITCOIN_QRC}
125+
${BITCOIN_LOCALE_QRC}
124126
)
125127
target_compile_definitions(bitcoinqt
126128
PUBLIC

0 commit comments

Comments
 (0)