From 1936f8dde3f3f12a135a0d4149283a814daf3c2c Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Thu, 17 Jul 2025 17:16:18 +0200
Subject: [PATCH] Add OPTION_ADD_AUTOGENERATETEXT

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

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 50020c41..8b1d7cd7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -87,6 +87,8 @@ if(BUILD_QUICK)
     include(ECMQmlModule)
 endif()
 
+option(OPTION_ADD_AUTOGENERATETEXT "Add support for autogenerate text plugin" OFF)
+
 find_package(Qt6 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Core Network Xml Sql)
 
 find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS
@@ -204,7 +206,9 @@ add_subdirectory(textemoticons)
 add_subdirectory(textutils)
 find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED MultimediaWidgets)
 add_subdirectory(textspeechtotext)
-add_subdirectory(textautogeneratetext)
+if(OPTION_ADD_AUTOGENERATETEXT)
+    add_subdirectory(textautogeneratetext)
+endif()
 
 find_package(Qt6TextToSpeech ${QT_REQUIRED_VERSION} CONFIG)
 set_package_properties(
-- 
2.50.1

