[libraries/ktextaddons] /: Reduce duplicate code

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit ad75f88911255be42272cb0955835a65cecf3877 by Laurent Montel.
Committed on 21/07/2026 at 11:27.
Pushed by mlaurent into branch 'master'.

Reduce duplicate code

M  +15   -22   textaddonswidgets/CMakeLists.txt
M  +12   -10   textautocorrection/core/CMakeLists.txt

https://invent.kde.org/libraries/ktextaddons/-/commit/ad75f88911255be42272cb0955835a65cecf3877

diff --git a/textaddonswidgets/CMakeLists.txt b/textaddonswidgets/CMakeLists.txt
index 759ccec82..9a3ff7bb7 100644
--- a/textaddonswidgets/CMakeLists.txt
+++ b/textaddonswidgets/CMakeLists.txt
@@ -307,19 +307,22 @@ install(
     DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/TextAddonsWidgets/textaddonswidgets
     COMPONENT Devel
 )
+set(TextAddonsWidgets_List_CamelCase_HEADERS
+    ${TextAddonsWidgets_CamelCase_HEADERS}
+    ${TextAddonsWidgets_Camelcaseneedupdateversionwidgets_HEADERS}
+    ${TextAddonsWidgets_Camelverifynewversion_HEADERS}
+    ${TextAddonsWidgets_Camelcasewhatsnew_HEADERS}
+    ${TextAddonsWidgets_Camelquicksearchbar_HEADERS}
+    ${TextAddonsWidgets_Camelcaseplugins_HEADERS}
+    ${TextAddonsWidgets_Camelcasemisc_HEADERS}
+    ${TextAddonsWidgets_Camelcasewhatsnewng_HEADERS}
+    ${TextAddonsWidgets_Camelcasecompletionlineedit_HEADERS}
+    ${TextAddonsWidgets_Camelcasemodel_HEADERS}
+    ${TextAddonsWidgets_Camelcaselayout_HEADERS}
+)
 install(
     FILES
-        ${TextAddonsWidgets_CamelCase_HEADERS}
-        ${TextAddonsWidgets_Camelcaseneedupdateversionwidgets_HEADERS}
-        ${TextAddonsWidgets_Camelverifynewversion_HEADERS}
-        ${TextAddonsWidgets_Camelcasewhatsnew_HEADERS}
-        ${TextAddonsWidgets_Camelquicksearchbar_HEADERS}
-        ${TextAddonsWidgets_Camelcaseplugins_HEADERS}
-        ${TextAddonsWidgets_Camelcasemisc_HEADERS}
-        ${TextAddonsWidgets_Camelcasewhatsnewng_HEADERS}
-        ${TextAddonsWidgets_Camelcasecompletionlineedit_HEADERS}
-        ${TextAddonsWidgets_Camelcasemodel_HEADERS}
-        ${TextAddonsWidgets_Camelcaselayout_HEADERS}
+        ${TextAddonsWidgets_List_CamelCase_HEADERS}
     DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/TextAddonsWidgets/TextAddonsWidgets/
     COMPONENT Devel
 )
@@ -377,16 +380,6 @@ ecm_installed_library_check_include_strings(KF6TextAddonsWidgets
 
 ecm_installed_library_check_include_strings(KF6TextAddonsWidgets
     HEADERS
-    ${TextAddonsWidgets_CamelCase_HEADERS}
-    ${TextAddonsWidgets_Camelcaseneedupdateversionwidgets_HEADERS}
-    ${TextAddonsWidgets_Camelverifynewversion_HEADERS}
-    ${TextAddonsWidgets_Camelcasewhatsnew_HEADERS}
-    ${TextAddonsWidgets_Camelquicksearchbar_HEADERS}
-    ${TextAddonsWidgets_Camelcaseplugins_HEADERS}
-    ${TextAddonsWidgets_Camelcasemisc_HEADERS}
-    ${TextAddonsWidgets_Camelcasewhatsnewng_HEADERS}
-    ${TextAddonsWidgets_Camelcasecompletionlineedit_HEADERS}
-    ${TextAddonsWidgets_Camelcasemodel_HEADERS}
-    ${TextAddonsWidgets_Camelcaselayout_HEADERS}
+    ${TextAddonsWidgets_List_CamelCase_HEADERS}
     PREFIX TextAddonsWidgets
 )
diff --git a/textautocorrection/core/CMakeLists.txt b/textautocorrection/core/CMakeLists.txt
index c995b8a76..61144f98d 100644
--- a/textautocorrection/core/CMakeLists.txt
+++ b/textautocorrection/core/CMakeLists.txt
@@ -158,23 +158,29 @@ ecm_generate_headers(TextAutoCorrectionCore_Camelcasesettings_HEADERS
     PREFIX TextAutoCorrectionCore
     RELATIVE settings
 )
+set(TextAutoCorrectionCore_camelcaseautocorrection_list_HEADERS
+    ${TextAutoCorrectionCore_Camelcaseautocorrection_HEADERS}
+    ${TextAutoCorrectionCore_Camelcaseautocorrectionimport_HEADERS}
+    ${TextAutoCorrectionCore_Camelcasesettings_HEADERS}
+)
 
 install(
     FILES
         ${TextAutoCorrectionCore_Camelcaseautocorrection_HEADERS}
-        ${TextAutoCorrectionCore_Camelcaseautocorrectionimport_HEADERS}
-        ${TextAutoCorrectionCore_Camelcasesettings_HEADERS}
     DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/TextAutoCorrectionCore/TextAutoCorrectionCore
     COMPONENT Devel
 )
 
+set(TextAutoCorrectionCore_autocorrection_list_HEADERS
+    ${TextAutoCorrectionCore_autocorrection_HEADERS}
+    ${TextAutoCorrectionCore_settings_HEADERS}
+    ${TextAutoCorrectionCore_autocorrectionimport_HEADERS}
+)
 install(
     FILES
         ${CMAKE_CURRENT_BINARY_DIR}/textautocorrectioncore_export.h
         ${CMAKE_CURRENT_BINARY_DIR}/textautocorrectionsetting_base.h
-        ${TextAutoCorrectionCore_autocorrection_HEADERS}
-        ${TextAutoCorrectionCore_settings_HEADERS}
-        ${TextAutoCorrectionCore_autocorrectionimport_HEADERS}
+        ${TextAutoCorrectionCore_autocorrection_list_HEADERS}
     DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/TextAutoCorrectionCore/textautocorrectioncore
     COMPONENT Devel
 )
@@ -201,16 +207,12 @@ ecm_add_installed_library_check(KF6TextAutoCorrectionCore
 
 ecm_installed_library_check_include_strings(KF6TextAutoCorrectionCore
     HEADERS
-    ${TextAutoCorrectionCore_autocorrection_HEADERS}
-    ${TextAutoCorrectionCore_settings_HEADERS}
-    ${TextAutoCorrectionCore_autocorrectionimport_HEADERS}
+    ${TextAutoCorrectionCore_autocorrection_list_HEADERS}
     PREFIX textautocorrectioncore
 )
 
 ecm_installed_library_check_include_strings(KF6TextAutoCorrectionCore
     HEADERS
     ${TextAutoCorrectionCore_Camelcaseautocorrection_HEADERS}
-    ${TextAutoCorrectionCore_Camelcaseautocorrectionimport_HEADERS}
-    ${TextAutoCorrectionCore_Camelcasesettings_HEADERS}
     PREFIX TextAutoCorrectionCore
 )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.