From 0a0edfada02114cbb4b1e3a00170b0e755449f3c Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 9 Sep 2023 11:59:02 +0200 Subject: [PATCH] CMake: do REQUIRED searches at beginning, avoid toggle of KF5 status --- CMakeLists.txt | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 30bc232d6..3ce714cb1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -348,36 +348,15 @@ if(ECM_FOUND) include(KDEInstallDirs) endif() -find_package(${kfname} ${KF_VERSION} QUIET COMPONENTS CoreAddons) -set_package_properties( - ${kfname} - PROPERTIES - TYPE REQUIRED - DESCRIPTION "KDE Frameworks (CoreAddons)" - URL "https://api.kde.org/frameworks/kcoreaddons/" - PURPOSE "About Calamares" -) - -feature_summary( - WHAT REQUIRED_PACKAGES_NOT_FOUND - FATAL_ON_MISSING_REQUIRED_PACKAGES - DESCRIPTION "The following REQUIRED packages were not found:" - QUIET_ON_EMPTY -) +find_package(${kfname} ${KF_VERSION} QUIET REQUIRED COMPONENTS CoreAddons) +# After this point, there should be no REQUIRED find_packages, +# since we want tidy reporting of optional dependencies. # # OPTIONAL DEPENDENCIES # # First, set KF back to optional so that any missing components don't trip us up. find_package(${kfname} ${KF_VERSION} QUIET COMPONENTS CoreAddons Crash) -set_package_properties( - ${kfname} - PROPERTIES - TYPE OPTIONAL - DESCRIPTION "KDE Frameworks" - URL "https://api.kde.org/frameworks/" - PURPOSE "KDE Integration" -) if(NOT TARGET ${kfname}::Crash) if(BUILD_CRASH_REPORTING)