From 6b3181cf92f1fc74da1e8a82f690a1526cb4e900 Mon Sep 17 00:00:00 2001 From: gregory guy Date: Sun, 29 Mar 2020 19:41:28 +0200 Subject: Conversion to the cmake building system. Added several man pages taken from the Debian packaging. Cleanup headers in ui files. Add png icons for mono theme. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: gregory guy cmake: - Use tde_add_check_executable instead of a combination of separate calls to tde_add_executable and add_test. - Simplify the detection of time.h and sys/time.h headers. - Refactor phrasebook files install, kmouth. Signed-off-by: Slávek Banko --- kmouth/CMakeLists.txt | 63 ++++++++++++++++++++++++ kmouth/books/CMakeLists.txt | 18 +++++++ kmouth/icons/CMakeLists.txt | 9 ++++ kmouth/icons/app/CMakeLists.txt | 3 ++ kmouth/icons/history/CMakeLists.txt | 3 ++ kmouth/icons/phrase/CMakeLists.txt | 3 ++ kmouth/icons/phrasebook/CMakeLists.txt | 3 ++ kmouth/kmouth.h | 3 +- kmouth/phrasebook/CMakeLists.txt | 31 ++++++++++++ kmouth/phrasebook/buttonboxui.ui | 3 ++ kmouth/preferencesui.ui | 3 ++ kmouth/texttospeechconfigurationui.ui | 12 ++--- kmouth/wordcompletion/CMakeLists.txt | 30 +++++++++++ kmouth/wordcompletion/creationsourcedetailsui.ui | 11 ++--- kmouth/wordcompletion/kdedocsourceui.ui | 8 ++- kmouth/wordcompletion/wordcompletionui.ui | 14 ++---- 16 files changed, 186 insertions(+), 31 deletions(-) create mode 100644 kmouth/CMakeLists.txt create mode 100644 kmouth/books/CMakeLists.txt create mode 100644 kmouth/icons/CMakeLists.txt create mode 100644 kmouth/icons/app/CMakeLists.txt create mode 100644 kmouth/icons/history/CMakeLists.txt create mode 100644 kmouth/icons/phrase/CMakeLists.txt create mode 100644 kmouth/icons/phrasebook/CMakeLists.txt create mode 100644 kmouth/phrasebook/CMakeLists.txt create mode 100644 kmouth/wordcompletion/CMakeLists.txt (limited to 'kmouth') diff --git a/kmouth/CMakeLists.txt b/kmouth/CMakeLists.txt new file mode 100644 index 0000000..9fec611 --- /dev/null +++ b/kmouth/CMakeLists.txt @@ -0,0 +1,63 @@ +add_subdirectory( icons ) +add_subdirectory( phrasebook ) +add_subdirectory( wordcompletion ) +add_subdirectory( books ) + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR}/kmouth/phrasebook + ${CMAKE_BINARY_DIR}/kmouth/wordcompletion +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIB_DIR} +) + + +##### kmouth (executable) + +tde_add_executable( kmouth AUTOMOC + + SOURCES + preferencesui.ui + texttospeechconfigurationui.ui + texttospeechconfigurationwidget.cpp + optionsdialog.cpp + configwizard.cpp + phraseedit.cpp + phraselist.cpp + speech.cpp + texttospeechsystem.cpp + phraselistitem.cpp + kmouth.cpp + main.cpp + LINK + tdecore-shared + tdeui-shared + tdeio-shared + tdeprint-shared + phrasebook-static + wordcompletion-static + + DESTINATION ${BIN_INSTALL_DIR} +) + + +##### other data + +install( + FILES kmouthui.rc + DESTINATION ${DATA_INSTALL_DIR}/kmouth +) + +install( + FILES kmouthrc + DESTINATION ${CONFIG_INSTALL_DIR} +) + +tde_create_translated_desktop( kmouth.desktop ) diff --git a/kmouth/books/CMakeLists.txt b/kmouth/books/CMakeLists.txt new file mode 100644 index 0000000..282dcb3 --- /dev/null +++ b/kmouth/books/CMakeLists.txt @@ -0,0 +1,18 @@ +##### phrasebooks + +foreach( _lang de en nl sv ) + install( + FILES + ${_lang}-courteousness.phrasebook + ${_lang}-greetings.phrasebook + ${_lang}-howareyou.phrasebook + ${_lang}-personal.phrasebook + + DESTINATION ${DATA_INSTALL_DIR}/kmouth/books/${_lang} + ) + + tde_create_translated_desktop( + SOURCE ${_lang}.desktop + DESTINATION ${DATA_INSTALL_DIR}/kmouth/books/${_lang} + ) +endforeach() diff --git a/kmouth/icons/CMakeLists.txt b/kmouth/icons/CMakeLists.txt new file mode 100644 index 0000000..52c60aa --- /dev/null +++ b/kmouth/icons/CMakeLists.txt @@ -0,0 +1,9 @@ +add_subdirectory( history ) +add_subdirectory( phrase ) +add_subdirectory( phrasebook ) +add_subdirectory( app ) + + +tde_install_icons( + DESTINATION ${DATA_INSTALL_DIR}/kmouth/icons +) diff --git a/kmouth/icons/app/CMakeLists.txt b/kmouth/icons/app/CMakeLists.txt new file mode 100644 index 0000000..643654c --- /dev/null +++ b/kmouth/icons/app/CMakeLists.txt @@ -0,0 +1,3 @@ +##### icons + +tde_install_icons() diff --git a/kmouth/icons/history/CMakeLists.txt b/kmouth/icons/history/CMakeLists.txt new file mode 100644 index 0000000..9133d6b --- /dev/null +++ b/kmouth/icons/history/CMakeLists.txt @@ -0,0 +1,3 @@ +tde_install_icons( + DESTINATION ${DATA_INSTALL_DIR}/kmouth/icons +) diff --git a/kmouth/icons/phrase/CMakeLists.txt b/kmouth/icons/phrase/CMakeLists.txt new file mode 100644 index 0000000..9133d6b --- /dev/null +++ b/kmouth/icons/phrase/CMakeLists.txt @@ -0,0 +1,3 @@ +tde_install_icons( + DESTINATION ${DATA_INSTALL_DIR}/kmouth/icons +) diff --git a/kmouth/icons/phrasebook/CMakeLists.txt b/kmouth/icons/phrasebook/CMakeLists.txt new file mode 100644 index 0000000..9133d6b --- /dev/null +++ b/kmouth/icons/phrasebook/CMakeLists.txt @@ -0,0 +1,3 @@ +tde_install_icons( + DESTINATION ${DATA_INSTALL_DIR}/kmouth/icons +) diff --git a/kmouth/kmouth.h b/kmouth/kmouth.h index 79f1aa0..628128c 100644 --- a/kmouth/kmouth.h +++ b/kmouth/kmouth.h @@ -19,9 +19,8 @@ #ifndef KMOUTH_H #define KMOUTH_H - #ifdef HAVE_CONFIG_H -#include +#include "config.h" #endif // include files for TQt diff --git a/kmouth/phrasebook/CMakeLists.txt b/kmouth/phrasebook/CMakeLists.txt new file mode 100644 index 0000000..ed96605 --- /dev/null +++ b/kmouth/phrasebook/CMakeLists.txt @@ -0,0 +1,31 @@ +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIB_DIR} +) + + +##### phrasebook (static) + +tde_add_library( phrasebook STATIC_PIC AUTOMOC + + SOURCES + buttonboxui.ui + phrasetree.cpp + phrasebookparser.cpp + phrasebookdialog.cpp + phrasebook.cpp +) + + +install( + FILES phrasebookdialogui.rc + DESTINATION ${DATA_INSTALL_DIR}/kmouth +) diff --git a/kmouth/phrasebook/buttonboxui.ui b/kmouth/phrasebook/buttonboxui.ui index 59f1d40..73eccf5 100644 --- a/kmouth/phrasebook/buttonboxui.ui +++ b/kmouth/phrasebook/buttonboxui.ui @@ -104,4 +104,7 @@ + + klineedit.h + diff --git a/kmouth/preferencesui.ui b/kmouth/preferencesui.ui index 6d998cd..16cb7ce 100644 --- a/kmouth/preferencesui.ui +++ b/kmouth/preferencesui.ui @@ -159,4 +159,7 @@ + + kcombobox.h + diff --git a/kmouth/texttospeechconfigurationui.ui b/kmouth/texttospeechconfigurationui.ui index 59bcf7a..afbcfd6 100644 --- a/kmouth/texttospeechconfigurationui.ui +++ b/kmouth/texttospeechconfigurationui.ui @@ -161,10 +161,10 @@ configurationChanged() - - kurlrequester.h - klineedit.h - kpushbutton.h - kcombobox.h - + + kurlrequester.h + klineedit.h + kpushbutton.h + kcombobox.h + diff --git a/kmouth/wordcompletion/CMakeLists.txt b/kmouth/wordcompletion/CMakeLists.txt new file mode 100644 index 0000000..295a8d0 --- /dev/null +++ b/kmouth/wordcompletion/CMakeLists.txt @@ -0,0 +1,30 @@ +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIB_DIR} +) + + +##### wordcompletion (static) + +tde_add_library( wordcompletion STATIC_PIC AUTOMOC + + SOURCES + wordcompletionui.ui + creationsourceui.ui + creationsourcedetailsui.ui + kdedocsourceui.ui + wordlist.cpp + wordcompletion.cpp + wordcompletionwidget.cpp + dictionarycreationwizard.cpp + klanguagebutton.cpp + klanguagebuttonhelper.cpp +) diff --git a/kmouth/wordcompletion/creationsourcedetailsui.ui b/kmouth/wordcompletion/creationsourcedetailsui.ui index 52aa8a7..1efd8bd 100644 --- a/kmouth/wordcompletion/creationsourcedetailsui.ui +++ b/kmouth/wordcompletion/creationsourcedetailsui.ui @@ -159,6 +159,9 @@ klanguagebutton.h klanguagebuttonhelper.h creationsourcedetailsui.ui.h + kurlrequester.h + kpushbutton.h + kcombobox.h class KLanguageButton @@ -173,12 +176,4 @@ init() - - kinputdialog.h - kpushbutton.h - kcombobox.h - kurlrequester.h - kinputdialog.h - kpushbutton.h - diff --git a/kmouth/wordcompletion/kdedocsourceui.ui b/kmouth/wordcompletion/kdedocsourceui.ui index c310fa1..91a410a 100644 --- a/kmouth/wordcompletion/kdedocsourceui.ui +++ b/kmouth/wordcompletion/kdedocsourceui.ui @@ -82,6 +82,9 @@ klanguagebutton.h klanguagebuttonhelper.h kdedocsourceui.ui.h + kurlrequester.h + klineedit.h + kpushbutton.h class KLanguageButton @@ -93,9 +96,4 @@ init() - - kurlrequester.h - klineedit.h - kpushbutton.h - diff --git a/kmouth/wordcompletion/wordcompletionui.ui b/kmouth/wordcompletion/wordcompletionui.ui index bc9cde5..c195cf0 100644 --- a/kmouth/wordcompletion/wordcompletionui.ui +++ b/kmouth/wordcompletion/wordcompletionui.ui @@ -266,6 +266,10 @@ klanguagebutton.h klanguagebuttonhelper.h wordcompletionui.ui.h + klineedit.h + kurlrequester.h + kpushbutton.h + tdelistview.h class KLanguageButton @@ -280,14 +284,4 @@ init() - - kurlrequester.h - kpushbutton.h - kpushbutton.h - kpushbutton.h - kpushbutton.h - kpushbutton.h - tdelistview.h - kinputdialog.h - -- cgit v1.2.1