From eacbe389502b4f89cb64dc24f10f3e8d2b5eb5c7 Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Mon, 2 Sep 2024 23:18:46 +0200
Subject: [PATCH] Make all KF6 and Qt6 modules optional, disable all subdirs
 except kdesu

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
---
 CMakeLists.txt | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index dc435bca..234447e0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,7 +28,7 @@ include(ECMDeprecationSettings)
 
 include(KDEGitCommitHooks)
 
-find_package(Qt6 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
+find_package(Qt6 ${QT_MIN_VERSION} CONFIG COMPONENTS
     Widgets
     Svg
     DBus
@@ -44,7 +44,7 @@ if (NOT Qt6Test_FOUND)
     set(BUILD_TESTING OFF CACHE BOOL "Build the testing tree.")
 endif()
 
-find_package(KF6 ${KF6_MIN_VERSION} REQUIRED COMPONENTS
+find_package(KF6 ${KF6_MIN_VERSION} COMPONENTS
     Config
     DocTools
     IconThemes
@@ -78,23 +78,23 @@ function(install_compat_symlink executable_target)
     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${executable_target}5 DESTINATION ${KDE_INSTALL_FULL_BINDIR})
 endfunction()
 
-add_subdirectory(keditfiletype)
-add_subdirectory(kmimetypefinder)
-add_subdirectory(kioclient)
-add_subdirectory(ksvgtopng)
-add_subdirectory(kdeinhibit)
-add_subdirectory(plasma-open-settings)
-add_subdirectory(kinfo)
-add_subdirectory(kstart)
+#add_subdirectory(keditfiletype)
+#add_subdirectory(kmimetypefinder)
+#add_subdirectory(kioclient)
+#add_subdirectory(ksvgtopng)
+#add_subdirectory(kdeinhibit)
+#add_subdirectory(plasma-open-settings)
+#add_subdirectory(kinfo)
+#add_subdirectory(kstart)
 
 if(KF6Su_FOUND)
     add_subdirectory(kdesu)
 endif()
 
-if(UNIX)
-    add_subdirectory(kdeeject)
-    add_subdirectory(kbroadcastnotification)
-endif()
+#if(UNIX)
+#    add_subdirectory(kdeeject)
+#    add_subdirectory(kbroadcastnotification)
+#endif()
 
 check_include_files(sys/wait.h HAVE_SYS_WAIT_H)
 
-- 
2.46.0

