From 69afb9192fe2979f2ad7551a42c8644fe046ed9e Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Tue, 2 Jul 2024 17:50:28 +0100 Subject: [PATCH] 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. --- CMakeLists.txt | 17 +++++++++++++++++ src/qt/CMakeLists.txt | 15 --------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e5510098c3db..7166ea8d22c4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -159,6 +159,23 @@ if(WITH_MULTIPROCESS) endif() cmake_dependent_option(BUILD_GUI_TESTS "Build test_bitcoin-qt executable." ON "BUILD_GUI;BUILD_TESTS" OFF) +if(BUILD_GUI) + set(qt_components Core Gui Widgets LinguistTools) + if(ENABLE_WALLET) + list(APPEND qt_components Network) + endif() + if(WITH_DBUS) + list(APPEND qt_components DBus) + endif() + if(BUILD_GUI_TESTS) + list(APPEND qt_components Test) + endif() + find_package(Qt5 5.11.3 MODULE REQUIRED + COMPONENTS ${qt_components} + ) + unset(qt_components) +endif() + option(BUILD_BENCH "Build bench_bitcoin executable." OFF) option(BUILD_FUZZ_BINARY "Build fuzz binary." OFF) cmake_dependent_option(ENABLE_FUZZ "Build for fuzzing. Enabling this will disable all other targets and override BUILD_FUZZ_BINARY." OFF "NOT MSVC" OFF) diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt index ccf3dfa30d6fd..279231340a4c5 100644 --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -2,21 +2,6 @@ # Distributed under the MIT software license, see the accompanying # file COPYING or https://opensource.org/license/mit/. -set(qt_components Core Gui Widgets LinguistTools) -if(ENABLE_WALLET) - list(APPEND qt_components Network) -endif() -if(WITH_DBUS) - list(APPEND qt_components DBus) -endif() -if(BUILD_GUI_TESTS) - list(APPEND qt_components Test) -endif() -find_package(Qt5 5.11.3 MODULE REQUIRED - COMPONENTS ${qt_components} -) -unset(qt_components) - if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") enable_language(OBJCXX) set(CMAKE_OBJCXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")