Skip to content

Commit 69afb91

Browse files
committed
cmake: Move Qt checks
This change ensures that these checks log won't be printed in between of the secp256k1's and Bitcoin Core's summaries.
1 parent 9afe0c8 commit 69afb91

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

CMakeLists.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,23 @@ if(WITH_MULTIPROCESS)
159159
endif()
160160

161161
cmake_dependent_option(BUILD_GUI_TESTS "Build test_bitcoin-qt executable." ON "BUILD_GUI;BUILD_TESTS" OFF)
162+
if(BUILD_GUI)
163+
set(qt_components Core Gui Widgets LinguistTools)
164+
if(ENABLE_WALLET)
165+
list(APPEND qt_components Network)
166+
endif()
167+
if(WITH_DBUS)
168+
list(APPEND qt_components DBus)
169+
endif()
170+
if(BUILD_GUI_TESTS)
171+
list(APPEND qt_components Test)
172+
endif()
173+
find_package(Qt5 5.11.3 MODULE REQUIRED
174+
COMPONENTS ${qt_components}
175+
)
176+
unset(qt_components)
177+
endif()
178+
162179
option(BUILD_BENCH "Build bench_bitcoin executable." OFF)
163180
option(BUILD_FUZZ_BINARY "Build fuzz binary." OFF)
164181
cmake_dependent_option(ENABLE_FUZZ "Build for fuzzing. Enabling this will disable all other targets and override BUILD_FUZZ_BINARY." OFF "NOT MSVC" OFF)

src/qt/CMakeLists.txt

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

5-
set(qt_components Core Gui Widgets LinguistTools)
6-
if(ENABLE_WALLET)
7-
list(APPEND qt_components Network)
8-
endif()
9-
if(WITH_DBUS)
10-
list(APPEND qt_components DBus)
11-
endif()
12-
if(BUILD_GUI_TESTS)
13-
list(APPEND qt_components Test)
14-
endif()
15-
find_package(Qt5 5.11.3 MODULE REQUIRED
16-
COMPONENTS ${qt_components}
17-
)
18-
unset(qt_components)
19-
205
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
216
enable_language(OBJCXX)
227
set(CMAKE_OBJCXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")

0 commit comments

Comments
 (0)