summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt66
l---------koffice-i18n-bg/CMakeLists.txt1
-rw-r--r--koffice-i18n-bg/data/Makefile.am4
l---------koffice-i18n-ca/CMakeLists.txt1
-rw-r--r--koffice-i18n-ca/data/CMakeLists.txt1
-rw-r--r--koffice-i18n-ca/data/koffice/CMakeLists.txt1
-rw-r--r--koffice-i18n-ca/data/koffice/autocorrect/CMakeLists.txt6
l---------koffice-i18n-cs/CMakeLists.txt1
-rw-r--r--koffice-i18n-cs/data/CMakeLists.txt1
-rw-r--r--koffice-i18n-cs/data/koffice/CMakeLists.txt1
-rw-r--r--koffice-i18n-cs/data/koffice/autocorrect/CMakeLists.txt6
l---------koffice-i18n-cy/CMakeLists.txt1
l---------koffice-i18n-da/CMakeLists.txt1
-rw-r--r--koffice-i18n-da/data/Makefile.am4
l---------koffice-i18n-de/CMakeLists.txt1
-rw-r--r--koffice-i18n-de/data/CMakeLists.txt1
-rw-r--r--koffice-i18n-de/data/koffice/CMakeLists.txt1
-rw-r--r--koffice-i18n-de/data/koffice/autocorrect/CMakeLists.txt6
l---------koffice-i18n-el/CMakeLists.txt1
l---------koffice-i18n-en_GB/CMakeLists.txt1
-rw-r--r--koffice-i18n-en_GB/data/Makefile.am4
l---------koffice-i18n-es/CMakeLists.txt1
-rw-r--r--koffice-i18n-es/data/CMakeLists.txt1
-rw-r--r--koffice-i18n-es/data/koffice/CMakeLists.txt1
-rw-r--r--koffice-i18n-es/data/koffice/autocorrect/CMakeLists.txt6
l---------koffice-i18n-et/CMakeLists.txt1
-rw-r--r--koffice-i18n-et/data/Makefile.am4
l---------koffice-i18n-eu/CMakeLists.txt1
l---------koffice-i18n-fa/CMakeLists.txt1
l---------koffice-i18n-fi/CMakeLists.txt1
-rw-r--r--koffice-i18n-fi/data/Makefile.am4
l---------koffice-i18n-fr/CMakeLists.txt1
-rw-r--r--koffice-i18n-fr/data/CMakeLists.txt1
-rw-r--r--koffice-i18n-fr/data/koffice/CMakeLists.txt1
-rw-r--r--koffice-i18n-fr/data/koffice/autocorrect/CMakeLists.txt6
l---------koffice-i18n-ga/CMakeLists.txt1
-rw-r--r--koffice-i18n-ga/data/Makefile.am4
l---------koffice-i18n-gl/CMakeLists.txt1
l---------koffice-i18n-hu/CMakeLists.txt1
-rw-r--r--koffice-i18n-hu/data/CMakeLists.txt1
-rw-r--r--koffice-i18n-hu/data/koffice/CMakeLists.txt1
-rw-r--r--koffice-i18n-hu/data/koffice/autocorrect/CMakeLists.txt6
l---------koffice-i18n-it/CMakeLists.txt1
-rw-r--r--koffice-i18n-it/data/CMakeLists.txt1
-rw-r--r--koffice-i18n-it/data/koffice/CMakeLists.txt1
-rw-r--r--koffice-i18n-it/data/koffice/autocorrect/CMakeLists.txt6
l---------koffice-i18n-ja/CMakeLists.txt1
l---------koffice-i18n-km/CMakeLists.txt1
l---------koffice-i18n-lv/CMakeLists.txt1
l---------koffice-i18n-ms/CMakeLists.txt1
l---------koffice-i18n-nb/CMakeLists.txt1
-rw-r--r--koffice-i18n-nb/data/Makefile.am4
l---------koffice-i18n-nds/CMakeLists.txt1
-rw-r--r--koffice-i18n-nds/data/Makefile.am4
l---------koffice-i18n-ne/CMakeLists.txt1
l---------koffice-i18n-nl/CMakeLists.txt1
-rw-r--r--koffice-i18n-nl/data/Makefile.am4
l---------koffice-i18n-pl/CMakeLists.txt1
-rw-r--r--koffice-i18n-pl/data/Makefile.am4
l---------koffice-i18n-pt/CMakeLists.txt1
-rw-r--r--koffice-i18n-pt/data/Makefile.am4
l---------koffice-i18n-pt_BR/CMakeLists.txt1
-rw-r--r--koffice-i18n-pt_BR/data/Makefile.am4
l---------koffice-i18n-ru/CMakeLists.txt1
-rw-r--r--koffice-i18n-ru/data/Makefile.am4
l---------koffice-i18n-sk/CMakeLists.txt1
-rw-r--r--koffice-i18n-sk/data/CMakeLists.txt1
-rw-r--r--koffice-i18n-sk/data/koffice/CMakeLists.txt1
-rw-r--r--koffice-i18n-sk/data/koffice/autocorrect/CMakeLists.txt6
l---------koffice-i18n-sl/CMakeLists.txt1
-rw-r--r--koffice-i18n-sl/data/Makefile.am4
l---------koffice-i18n-sr/CMakeLists.txt1
-rw-r--r--koffice-i18n-sr/data/Makefile.am4
l---------koffice-i18n-sr@Latn/CMakeLists.txt1
-rw-r--r--koffice-i18n-sr@Latn/data/Makefile.am4
l---------koffice-i18n-sv/CMakeLists.txt1
-rw-r--r--koffice-i18n-sv/data/Makefile.am4
l---------koffice-i18n-tr/CMakeLists.txt1
-rw-r--r--koffice-i18n-tr/data/Makefile.am4
l---------koffice-i18n-uk/CMakeLists.txt1
l---------koffice-i18n-zh_CN/CMakeLists.txt1
l---------koffice-i18n-zh_TW/CMakeLists.txt1
-rw-r--r--template/commonCMakeLists.txt140
83 files changed, 309 insertions, 72 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 00000000..1a76174e
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,66 @@
+#################################################
+#
+# (C) 2020-2022 Slávek Banko
+# slavek.banko (AT) axis.cz
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+cmake_minimum_required( VERSION 3.1 )
+
+
+##### general package setup #####################
+
+project( koffice-i18n )
+
+
+##### include essential cmake modules ###########
+
+include( FindPkgConfig ) # required for find_package( TDE )
+
+
+##### include our cmake modules #################
+
+include( TDEMacros )
+
+
+##### set version number ########################
+
+tde_set_project_version( )
+
+
+##### find required stuff #######################
+
+find_package( TDE )
+
+include( TDESetupPaths )
+tde_setup_paths( )
+
+
+##### process languages #########################
+
+file( GLOB _dirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} * )
+list( SORT _dirs )
+
+string( REGEX REPLACE "[ \r\n\t]+" ";" _linguas "$ENV{LINGUAS}" )
+
+foreach( _dir IN LISTS _dirs )
+ string( REGEX REPLACE "^${PROJECT_NAME}-" "" _lang "${_dir}" )
+ if( "${_dir}" MATCHES "^${PROJECT_NAME}-"
+ AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${_dir}
+ AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_dir}/CMakeLists.txt
+ AND ( "${_lang}" STREQUAL "en" OR
+ "${_linguas}" MATCHES "^;*$" OR
+ ";${_linguas};" MATCHES ";${_lang};" ))
+ add_subdirectory( ${_dir} )
+ string( REGEX REPLACE "@" "_" _lang_target "${_lang}" )
+ add_custom_target( install-${_lang_target}
+ COMMAND ${CMAKE_COMMAND}
+ -DCOMPONENT=${_lang}
+ -P ${CMAKE_BINARY_DIR}/cmake_install.cmake
+ )
+ endif()
+endforeach()
diff --git a/koffice-i18n-bg/CMakeLists.txt b/koffice-i18n-bg/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-bg/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-bg/data/Makefile.am b/koffice-i18n-bg/data/Makefile.am
deleted file mode 100644
index de31387e..00000000
--- a/koffice-i18n-bg/data/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-
-TOPLEVEL_LANG = bg
-SUBDIRS = $(AUTODIRS)
-
diff --git a/koffice-i18n-ca/CMakeLists.txt b/koffice-i18n-ca/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-ca/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-ca/data/CMakeLists.txt b/koffice-i18n-ca/data/CMakeLists.txt
new file mode 100644
index 00000000..6d0aa9f3
--- /dev/null
+++ b/koffice-i18n-ca/data/CMakeLists.txt
@@ -0,0 +1 @@
+tde_auto_add_subdirectories( )
diff --git a/koffice-i18n-ca/data/koffice/CMakeLists.txt b/koffice-i18n-ca/data/koffice/CMakeLists.txt
new file mode 100644
index 00000000..6d0aa9f3
--- /dev/null
+++ b/koffice-i18n-ca/data/koffice/CMakeLists.txt
@@ -0,0 +1 @@
+tde_auto_add_subdirectories( )
diff --git a/koffice-i18n-ca/data/koffice/autocorrect/CMakeLists.txt b/koffice-i18n-ca/data/koffice/autocorrect/CMakeLists.txt
new file mode 100644
index 00000000..ea81f9a1
--- /dev/null
+++ b/koffice-i18n-ca/data/koffice/autocorrect/CMakeLists.txt
@@ -0,0 +1,6 @@
+##### other data
+
+install(
+ FILES ca.xml
+ DESTINATION ${DATA_INSTALL_DIR}/koffice/autocorrect
+)
diff --git a/koffice-i18n-cs/CMakeLists.txt b/koffice-i18n-cs/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-cs/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-cs/data/CMakeLists.txt b/koffice-i18n-cs/data/CMakeLists.txt
new file mode 100644
index 00000000..6d0aa9f3
--- /dev/null
+++ b/koffice-i18n-cs/data/CMakeLists.txt
@@ -0,0 +1 @@
+tde_auto_add_subdirectories( )
diff --git a/koffice-i18n-cs/data/koffice/CMakeLists.txt b/koffice-i18n-cs/data/koffice/CMakeLists.txt
new file mode 100644
index 00000000..6d0aa9f3
--- /dev/null
+++ b/koffice-i18n-cs/data/koffice/CMakeLists.txt
@@ -0,0 +1 @@
+tde_auto_add_subdirectories( )
diff --git a/koffice-i18n-cs/data/koffice/autocorrect/CMakeLists.txt b/koffice-i18n-cs/data/koffice/autocorrect/CMakeLists.txt
new file mode 100644
index 00000000..effd1704
--- /dev/null
+++ b/koffice-i18n-cs/data/koffice/autocorrect/CMakeLists.txt
@@ -0,0 +1,6 @@
+##### other data
+
+install(
+ FILES cs.xml
+ DESTINATION ${DATA_INSTALL_DIR}/koffice/autocorrect
+)
diff --git a/koffice-i18n-cy/CMakeLists.txt b/koffice-i18n-cy/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-cy/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-da/CMakeLists.txt b/koffice-i18n-da/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-da/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-da/data/Makefile.am b/koffice-i18n-da/data/Makefile.am
deleted file mode 100644
index d4fba7de..00000000
--- a/koffice-i18n-da/data/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-
-TOPLEVEL_LANG = da
-SUBDIRS = $(AUTODIRS)
-
diff --git a/koffice-i18n-de/CMakeLists.txt b/koffice-i18n-de/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-de/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-de/data/CMakeLists.txt b/koffice-i18n-de/data/CMakeLists.txt
new file mode 100644
index 00000000..6d0aa9f3
--- /dev/null
+++ b/koffice-i18n-de/data/CMakeLists.txt
@@ -0,0 +1 @@
+tde_auto_add_subdirectories( )
diff --git a/koffice-i18n-de/data/koffice/CMakeLists.txt b/koffice-i18n-de/data/koffice/CMakeLists.txt
new file mode 100644
index 00000000..6d0aa9f3
--- /dev/null
+++ b/koffice-i18n-de/data/koffice/CMakeLists.txt
@@ -0,0 +1 @@
+tde_auto_add_subdirectories( )
diff --git a/koffice-i18n-de/data/koffice/autocorrect/CMakeLists.txt b/koffice-i18n-de/data/koffice/autocorrect/CMakeLists.txt
new file mode 100644
index 00000000..69df9dc5
--- /dev/null
+++ b/koffice-i18n-de/data/koffice/autocorrect/CMakeLists.txt
@@ -0,0 +1,6 @@
+##### other data
+
+install(
+ FILES de.xml
+ DESTINATION ${DATA_INSTALL_DIR}/koffice/autocorrect
+)
diff --git a/koffice-i18n-el/CMakeLists.txt b/koffice-i18n-el/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-el/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-en_GB/CMakeLists.txt b/koffice-i18n-en_GB/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-en_GB/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-en_GB/data/Makefile.am b/koffice-i18n-en_GB/data/Makefile.am
deleted file mode 100644
index d3823c7b..00000000
--- a/koffice-i18n-en_GB/data/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-
-TOPLEVEL_LANG = en_GB
-SUBDIRS = $(AUTODIRS)
-
diff --git a/koffice-i18n-es/CMakeLists.txt b/koffice-i18n-es/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-es/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-es/data/CMakeLists.txt b/koffice-i18n-es/data/CMakeLists.txt
new file mode 100644
index 00000000..6d0aa9f3
--- /dev/null
+++ b/koffice-i18n-es/data/CMakeLists.txt
@@ -0,0 +1 @@
+tde_auto_add_subdirectories( )
diff --git a/koffice-i18n-es/data/koffice/CMakeLists.txt b/koffice-i18n-es/data/koffice/CMakeLists.txt
new file mode 100644
index 00000000..6d0aa9f3
--- /dev/null
+++ b/koffice-i18n-es/data/koffice/CMakeLists.txt
@@ -0,0 +1 @@
+tde_auto_add_subdirectories( )
diff --git a/koffice-i18n-es/data/koffice/autocorrect/CMakeLists.txt b/koffice-i18n-es/data/koffice/autocorrect/CMakeLists.txt
new file mode 100644
index 00000000..972d5ebf
--- /dev/null
+++ b/koffice-i18n-es/data/koffice/autocorrect/CMakeLists.txt
@@ -0,0 +1,6 @@
+##### other data
+
+install(
+ FILES es.xml
+ DESTINATION ${DATA_INSTALL_DIR}/koffice/autocorrect
+)
diff --git a/koffice-i18n-et/CMakeLists.txt b/koffice-i18n-et/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-et/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-et/data/Makefile.am b/koffice-i18n-et/data/Makefile.am
deleted file mode 100644
index 209cfadb..00000000
--- a/koffice-i18n-et/data/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-
-TOPLEVEL_LANG = et
-SUBDIRS = $(AUTODIRS)
-
diff --git a/koffice-i18n-eu/CMakeLists.txt b/koffice-i18n-eu/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-eu/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-fa/CMakeLists.txt b/koffice-i18n-fa/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-fa/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-fi/CMakeLists.txt b/koffice-i18n-fi/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-fi/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-fi/data/Makefile.am b/koffice-i18n-fi/data/Makefile.am
deleted file mode 100644
index f7bc2512..00000000
--- a/koffice-i18n-fi/data/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-
-TOPLEVEL_LANG = fi
-SUBDIRS = $(AUTODIRS)
-
diff --git a/koffice-i18n-fr/CMakeLists.txt b/koffice-i18n-fr/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-fr/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-fr/data/CMakeLists.txt b/koffice-i18n-fr/data/CMakeLists.txt
new file mode 100644
index 00000000..6d0aa9f3
--- /dev/null
+++ b/koffice-i18n-fr/data/CMakeLists.txt
@@ -0,0 +1 @@
+tde_auto_add_subdirectories( )
diff --git a/koffice-i18n-fr/data/koffice/CMakeLists.txt b/koffice-i18n-fr/data/koffice/CMakeLists.txt
new file mode 100644
index 00000000..6d0aa9f3
--- /dev/null
+++ b/koffice-i18n-fr/data/koffice/CMakeLists.txt
@@ -0,0 +1 @@
+tde_auto_add_subdirectories( )
diff --git a/koffice-i18n-fr/data/koffice/autocorrect/CMakeLists.txt b/koffice-i18n-fr/data/koffice/autocorrect/CMakeLists.txt
new file mode 100644
index 00000000..7e711c48
--- /dev/null
+++ b/koffice-i18n-fr/data/koffice/autocorrect/CMakeLists.txt
@@ -0,0 +1,6 @@
+##### other data
+
+install(
+ FILES fr.xml
+ DESTINATION ${DATA_INSTALL_DIR}/koffice/autocorrect
+)
diff --git a/koffice-i18n-ga/CMakeLists.txt b/koffice-i18n-ga/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-ga/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-ga/data/Makefile.am b/koffice-i18n-ga/data/Makefile.am
deleted file mode 100644
index 8953da26..00000000
--- a/koffice-i18n-ga/data/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-
-TOPLEVEL_LANG = ga
-SUBDIRS = $(AUTODIRS)
-
diff --git a/koffice-i18n-gl/CMakeLists.txt b/koffice-i18n-gl/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-gl/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-hu/CMakeLists.txt b/koffice-i18n-hu/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-hu/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-hu/data/CMakeLists.txt b/koffice-i18n-hu/data/CMakeLists.txt
new file mode 100644
index 00000000..6d0aa9f3
--- /dev/null
+++ b/koffice-i18n-hu/data/CMakeLists.txt
@@ -0,0 +1 @@
+tde_auto_add_subdirectories( )
diff --git a/koffice-i18n-hu/data/koffice/CMakeLists.txt b/koffice-i18n-hu/data/koffice/CMakeLists.txt
new file mode 100644
index 00000000..6d0aa9f3
--- /dev/null
+++ b/koffice-i18n-hu/data/koffice/CMakeLists.txt
@@ -0,0 +1 @@
+tde_auto_add_subdirectories( )
diff --git a/koffice-i18n-hu/data/koffice/autocorrect/CMakeLists.txt b/koffice-i18n-hu/data/koffice/autocorrect/CMakeLists.txt
new file mode 100644
index 00000000..5bd755e6
--- /dev/null
+++ b/koffice-i18n-hu/data/koffice/autocorrect/CMakeLists.txt
@@ -0,0 +1,6 @@
+##### other data
+
+install(
+ FILES hu.xml
+ DESTINATION ${DATA_INSTALL_DIR}/koffice/autocorrect
+)
diff --git a/koffice-i18n-it/CMakeLists.txt b/koffice-i18n-it/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-it/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-it/data/CMakeLists.txt b/koffice-i18n-it/data/CMakeLists.txt
new file mode 100644
index 00000000..6d0aa9f3
--- /dev/null
+++ b/koffice-i18n-it/data/CMakeLists.txt
@@ -0,0 +1 @@
+tde_auto_add_subdirectories( )
diff --git a/koffice-i18n-it/data/koffice/CMakeLists.txt b/koffice-i18n-it/data/koffice/CMakeLists.txt
new file mode 100644
index 00000000..6d0aa9f3
--- /dev/null
+++ b/koffice-i18n-it/data/koffice/CMakeLists.txt
@@ -0,0 +1 @@
+tde_auto_add_subdirectories( )
diff --git a/koffice-i18n-it/data/koffice/autocorrect/CMakeLists.txt b/koffice-i18n-it/data/koffice/autocorrect/CMakeLists.txt
new file mode 100644
index 00000000..0d135f51
--- /dev/null
+++ b/koffice-i18n-it/data/koffice/autocorrect/CMakeLists.txt
@@ -0,0 +1,6 @@
+##### other data
+
+install(
+ FILES it.xml
+ DESTINATION ${DATA_INSTALL_DIR}/koffice/autocorrect
+)
diff --git a/koffice-i18n-ja/CMakeLists.txt b/koffice-i18n-ja/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-ja/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-km/CMakeLists.txt b/koffice-i18n-km/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-km/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-lv/CMakeLists.txt b/koffice-i18n-lv/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-lv/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-ms/CMakeLists.txt b/koffice-i18n-ms/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-ms/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-nb/CMakeLists.txt b/koffice-i18n-nb/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-nb/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-nb/data/Makefile.am b/koffice-i18n-nb/data/Makefile.am
deleted file mode 100644
index a7ae1923..00000000
--- a/koffice-i18n-nb/data/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-
-TOPLEVEL_LANG = nb
-SUBDIRS = $(AUTODIRS)
-
diff --git a/koffice-i18n-nds/CMakeLists.txt b/koffice-i18n-nds/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-nds/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-nds/data/Makefile.am b/koffice-i18n-nds/data/Makefile.am
deleted file mode 100644
index 17461b8b..00000000
--- a/koffice-i18n-nds/data/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-
-TOPLEVEL_LANG = nds
-SUBDIRS = $(AUTODIRS)
-
diff --git a/koffice-i18n-ne/CMakeLists.txt b/koffice-i18n-ne/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-ne/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-nl/CMakeLists.txt b/koffice-i18n-nl/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-nl/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-nl/data/Makefile.am b/koffice-i18n-nl/data/Makefile.am
deleted file mode 100644
index ce8ad683..00000000
--- a/koffice-i18n-nl/data/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-SUBDIRS = $(AUTODIRS)
-KDE_LANG=nl
-KDE_DOCS=AUTO
-
diff --git a/koffice-i18n-pl/CMakeLists.txt b/koffice-i18n-pl/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-pl/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-pl/data/Makefile.am b/koffice-i18n-pl/data/Makefile.am
deleted file mode 100644
index 09cfc219..00000000
--- a/koffice-i18n-pl/data/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-
-TOPLEVEL_LANG = pl
-SUBDIRS = $(AUTODIRS)
-
diff --git a/koffice-i18n-pt/CMakeLists.txt b/koffice-i18n-pt/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-pt/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-pt/data/Makefile.am b/koffice-i18n-pt/data/Makefile.am
deleted file mode 100644
index 151d7e04..00000000
--- a/koffice-i18n-pt/data/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-
-TOPLEVEL_LANG = pt
-SUBDIRS = $(AUTODIRS)
-
diff --git a/koffice-i18n-pt_BR/CMakeLists.txt b/koffice-i18n-pt_BR/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-pt_BR/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-pt_BR/data/Makefile.am b/koffice-i18n-pt_BR/data/Makefile.am
deleted file mode 100644
index 7fd83d71..00000000
--- a/koffice-i18n-pt_BR/data/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-
-TOPLEVEL_LANG = pt_BR
-SUBDIRS = $(AUTODIRS)
-
diff --git a/koffice-i18n-ru/CMakeLists.txt b/koffice-i18n-ru/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-ru/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-ru/data/Makefile.am b/koffice-i18n-ru/data/Makefile.am
deleted file mode 100644
index f474d167..00000000
--- a/koffice-i18n-ru/data/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-
-TOPLEVEL_LANG = ru
-SUBDIRS = $(AUTODIRS)
-
diff --git a/koffice-i18n-sk/CMakeLists.txt b/koffice-i18n-sk/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-sk/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-sk/data/CMakeLists.txt b/koffice-i18n-sk/data/CMakeLists.txt
new file mode 100644
index 00000000..6d0aa9f3
--- /dev/null
+++ b/koffice-i18n-sk/data/CMakeLists.txt
@@ -0,0 +1 @@
+tde_auto_add_subdirectories( )
diff --git a/koffice-i18n-sk/data/koffice/CMakeLists.txt b/koffice-i18n-sk/data/koffice/CMakeLists.txt
new file mode 100644
index 00000000..6d0aa9f3
--- /dev/null
+++ b/koffice-i18n-sk/data/koffice/CMakeLists.txt
@@ -0,0 +1 @@
+tde_auto_add_subdirectories( )
diff --git a/koffice-i18n-sk/data/koffice/autocorrect/CMakeLists.txt b/koffice-i18n-sk/data/koffice/autocorrect/CMakeLists.txt
new file mode 100644
index 00000000..f54b7376
--- /dev/null
+++ b/koffice-i18n-sk/data/koffice/autocorrect/CMakeLists.txt
@@ -0,0 +1,6 @@
+##### other data
+
+install(
+ FILES sk.xml
+ DESTINATION ${DATA_INSTALL_DIR}/koffice/autocorrect
+)
diff --git a/koffice-i18n-sl/CMakeLists.txt b/koffice-i18n-sl/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-sl/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-sl/data/Makefile.am b/koffice-i18n-sl/data/Makefile.am
deleted file mode 100644
index 851158ee..00000000
--- a/koffice-i18n-sl/data/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-
-TOPLEVEL_LANG = sl
-SUBDIRS = $(AUTODIRS)
-
diff --git a/koffice-i18n-sr/CMakeLists.txt b/koffice-i18n-sr/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-sr/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-sr/data/Makefile.am b/koffice-i18n-sr/data/Makefile.am
deleted file mode 100644
index f3795b3a..00000000
--- a/koffice-i18n-sr/data/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-
-TOPLEVEL_LANG = sr
-SUBDIRS = $(AUTODIRS)
-
diff --git a/koffice-i18n-sr@Latn/CMakeLists.txt b/koffice-i18n-sr@Latn/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-sr@Latn/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-sr@Latn/data/Makefile.am b/koffice-i18n-sr@Latn/data/Makefile.am
deleted file mode 100644
index f3795b3a..00000000
--- a/koffice-i18n-sr@Latn/data/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-
-TOPLEVEL_LANG = sr
-SUBDIRS = $(AUTODIRS)
-
diff --git a/koffice-i18n-sv/CMakeLists.txt b/koffice-i18n-sv/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-sv/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-sv/data/Makefile.am b/koffice-i18n-sv/data/Makefile.am
deleted file mode 100644
index 408a4131..00000000
--- a/koffice-i18n-sv/data/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-
-TOPLEVEL_LANG = sv
-SUBDIRS = $(AUTODIRS)
-
diff --git a/koffice-i18n-tr/CMakeLists.txt b/koffice-i18n-tr/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-tr/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-tr/data/Makefile.am b/koffice-i18n-tr/data/Makefile.am
deleted file mode 100644
index 40f1c140..00000000
--- a/koffice-i18n-tr/data/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-
-TOPLEVEL_LANG = tr
-SUBDIRS = $(AUTODIRS)
-
diff --git a/koffice-i18n-uk/CMakeLists.txt b/koffice-i18n-uk/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-uk/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-zh_CN/CMakeLists.txt b/koffice-i18n-zh_CN/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-zh_CN/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/koffice-i18n-zh_TW/CMakeLists.txt b/koffice-i18n-zh_TW/CMakeLists.txt
new file mode 120000
index 00000000..2fe973c8
--- /dev/null
+++ b/koffice-i18n-zh_TW/CMakeLists.txt
@@ -0,0 +1 @@
+../template/commonCMakeLists.txt \ No newline at end of file
diff --git a/template/commonCMakeLists.txt b/template/commonCMakeLists.txt
new file mode 100644
index 00000000..b628bf05
--- /dev/null
+++ b/template/commonCMakeLists.txt
@@ -0,0 +1,140 @@
+#################################################
+#
+# (C) 2013 Alexander Golubev (Fat-Zer)
+# fatzer2 (AT) gmail.com
+#
+# (C) 2020-2022 Slávek Banko
+# slavek.banko (AT) axis.cz
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+cmake_minimum_required( VERSION 3.1 )
+
+
+##### general package setup #####################
+
+string( REGEX REPLACE ".*-([^-]*)$" "\\1" _lang ${CMAKE_CURRENT_SOURCE_DIR} )
+message( STATUS "Configure for language ${_lang}" )
+
+project( koffice-i18n-${_lang} )
+
+
+##### include essential cmake modules ###########
+
+include( FindPkgConfig ) # required for find_package( TDE )
+
+
+##### include our cmake modules #################
+
+include( TDEMacros )
+
+
+##### find required stuff #######################
+
+find_package( TDE )
+
+
+##### setup install paths #######################
+
+tde_save_and_set( CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "${_lang}" )
+include( TDESetupPaths )
+tde_setup_paths( )
+
+
+##### user requested modules ####################
+
+option( BUILD_ALL "Build all" OFF )
+option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
+option( BUILD_DATA "Build data" ${BUILD_ALL} )
+option( BUILD_MESSAGES "Build message and GUI translation" ${BUILD_ALL} )
+
+
+###### subdirectories ###########################
+
+# build data files
+if( BUILD_DATA AND
+ EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/data/CMakeLists.txt )
+ add_subdirectory( data )
+endif()
+
+
+# build documentation
+if( BUILD_DOC )
+ # search directories with documentation
+ file( GLOB_RECURSE _doc_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} docs/* )
+ foreach( _doc_file IN LISTS _doc_files )
+ get_filename_component( _doc_dir ${_doc_file} PATH )
+ list( APPEND _doc_dirs ${_doc_dir} )
+ endforeach()
+ if( _doc_dirs )
+
+ # sort and clear the list of directories
+ list( SORT _doc_dirs )
+ list( REMOVE_DUPLICATES _doc_dirs )
+ list( REMOVE_ITEM _doc_dirs "docs/common" )
+
+ # create handbooks or install other files
+ foreach( _doc_dir IN LISTS _doc_dirs )
+ file( GLOB _doc_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${_doc_dir} ${_doc_dir}/*.docbook )
+ string( REGEX REPLACE "^[^/]*/[^/]*/" "" _doc_dest ${_doc_dir} )
+ if( _doc_files )
+ list( FIND _doc_files "index.docbook" _find_index )
+ if( -1 EQUAL _find_index )
+ set( _noindex "NOINDEX" )
+ else()
+ unset( _noindex )
+ endif()
+ tde_create_handbook(
+ SOURCE_BASEDIR ${_doc_dir}
+ ${_noindex}
+ LANG ${_lang}
+ DESTINATION ${_doc_dest}
+ )
+ else()
+ file( GLOB _doc_files
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ ${_doc_dir}/*.css ${_doc_dir}/*.png )
+ install(
+ FILES ${_doc_files}
+ DESTINATION ${HTML_INSTALL_DIR}/${_lang}/${_doc_dest}
+ )
+ endif()
+ endforeach()
+ endif()
+endif()
+
+
+# build messages
+if( BUILD_MESSAGES )
+ # install base files for locale
+ file( GLOB locale_base_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ messages/flag.png messages/charset )
+ if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/messages/entry.desktop )
+ tde_create_translated_desktop(
+ SOURCE messages/entry.desktop
+ DESTINATION ${LOCALE_INSTALL_DIR}/${_lang}
+ PO_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../translations/desktop_files/entry.desktop
+ )
+ endif()
+ if( locale_base_files )
+ install(
+ FILES ${locale_base_files}
+ DESTINATION ${LOCALE_INSTALL_DIR}/${_lang}
+ )
+ endif()
+
+ # create translations
+ file( GLOB_RECURSE _messages RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} messages/*.po )
+ if( _messages )
+ tde_create_translation( FILES ${_messages} LANG ${_lang} )
+ endif()
+endif()
+
+
+# restore default install component name
+
+tde_restore( CMAKE_INSTALL_DEFAULT_COMPONENT_NAME )