From d38a48e9006bb9b13d6a4e1f102b180e9165709c Mon Sep 17 00:00:00 2001
From: Adriaan de Groot <groot@kde.org>
Date: Tue, 2 Jan 2024 22:25:53 +0100
Subject: [PATCH] [packagechooser] Make AppData and AppStream optional default
 OFF

If set to *ON*, then the dependencies for these two are required
(e.g. QtXml and/or AppStreamQt).
---
 CMakeModules/AppStreamHelper.cmake         | 2 +-
 src/modules/packagechooser/CMakeLists.txt  | 4 ++--
 src/modules/packagechooserq/CMakeLists.txt | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/CMakeModules/AppStreamHelper.cmake b/CMakeModules/AppStreamHelper.cmake
index e23f2e4d42..9d32795cfa 100644
--- a/CMakeModules/AppStreamHelper.cmake
+++ b/CMakeModules/AppStreamHelper.cmake
@@ -11,7 +11,7 @@
 # variables (e.g. might be AppStreamQt6_FOUND).
 #
 
-option(BUILD_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" ON)
+option(BUILD_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" OFF)
 
 if(TARGET calaappstream)
     if(TARGET calamares::appstreamqt)
diff --git a/src/modules/packagechooser/CMakeLists.txt b/src/modules/packagechooser/CMakeLists.txt
index 5af6fc1c76..b878fef1c8 100644
--- a/src/modules/packagechooser/CMakeLists.txt
+++ b/src/modules/packagechooser/CMakeLists.txt
@@ -10,9 +10,9 @@ set(_extra_src "")
 ### OPTIONAL AppData XML support in PackageModel
 #
 #
-option(BUILD_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" ON)
+option(BUILD_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" OFF)
 if(BUILD_APPDATA)
-    find_package(${qtname} COMPONENTS Xml)
+    find_package(${qtname} REQUIRED COMPONENTS Xml)
     if(TARGET ${qtname}::Xml)
         add_definitions(-DHAVE_APPDATA)
         list(APPEND _extra_libraries ${qtname}::Xml)
diff --git a/src/modules/packagechooserq/CMakeLists.txt b/src/modules/packagechooserq/CMakeLists.txt
index 3b194d69a0..12c992b680 100644
--- a/src/modules/packagechooserq/CMakeLists.txt
+++ b/src/modules/packagechooserq/CMakeLists.txt
@@ -20,9 +20,9 @@ include_directories(${_packagechooser})
 ### OPTIONAL AppData XML support in PackageModel
 #
 #
-option(BUILD_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" ON)
+option(BUILD_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" OFF)
 if(BUILD_APPDATA)
-    find_package(${qtname} COMPONENTS Xml)
+    find_package(${qtname} REQUIRED COMPONENTS Xml)
     if(TARGET ${qtname}::Xml)
         add_definitions(-DHAVE_APPDATA)
         list(APPEND _extra_libraries ${qtname}::Xml)
-- 
GitLab