1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
cmake_minimum_required(VERSION 3.16)
# KDE Gear version, managed by release script
set (RELEASE_SERVICE_VERSION_MAJOR "24")
set (RELEASE_SERVICE_VERSION_MINOR "01")
set (RELEASE_SERVICE_VERSION_MICRO "90")
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
project(kmouth VERSION ${RELEASE_SERVICE_VERSION})
set(QT_REQUIRED_VERSION "6.4.0")
set(KF_MIN_VERSION "5.240.0")
if(NOT MSVC)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Wall -Wno-switch -O2 -g")
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -Wno-switch -O2")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Wno-switch -g3 -ggdb -O0" CACHE STRING "Debug options." FORCE)
endif(NOT MSVC)
include(FeatureSummary)
find_package(ECM ${KF_MIN_VERSION} NO_MODULE REQUIRED)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} )
include(ECMAddAppIcon)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMInstallIcons)
include(ECMSetupVersion)
include(ECMDeprecationSettings)
include(KDEClangFormat)
include(KDEGitCommitHooks)
find_package(Qt6 ${QT_MIN_VERSION} REQUIRED COMPONENTS
Core
PrintSupport
TextToSpeech
Xml
Widgets
)
find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS
Crash
Completion
Config
ConfigWidgets
CoreAddons
DocTools
I18n
KIO
WidgetsAddons
XmlGui
)
ecm_setup_version(${kmouth_VERSION}
VARIABLE_PREFIX KMOUTH
VERSION_HEADER version.h
)
include_directories (${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
ecm_set_disabled_deprecation_versions(QT 6.6 KF 5.240.0)
add_subdirectory( doc )
add_subdirectory( icons )
add_subdirectory( books )
include_directories(./wordcompletion/ )
########### next target ###############
add_executable(kmouth)
target_sources(kmouth PRIVATE
./phrasebook/phrasebookreader.cpp
./phrasebook/phrasebookdialog.cpp
./phrasebook/initialphrasebookwidget.cpp
./phrasebook/phrasebook.cpp
./wordcompletion/wordlist.cpp
./wordcompletion/wordcompletion.cpp
./wordcompletion/wordcompletionwidget.cpp
./wordcompletion/dictionarycreationwizard.cpp
texttospeechconfigurationwidget.cpp
optionsdialog.cpp
configwizard.cpp
phraselist.cpp
speech.cpp
texttospeechsystem.cpp
kmouth.cpp
main.cpp
kmouth.qrc
)
ki18n_wrap_ui(kmouth
./phrasebook/phrasebookdialog.ui
./wordcompletion/creationsourceui.ui
./wordcompletion/creationsourcedetailsui.ui
./wordcompletion/kdedocsourceui.ui
./wordcompletion/wordcompletionui.ui
preferencesui.ui
texttospeechconfigurationui.ui )
target_link_libraries(kmouth
KF6::Completion
KF6::ConfigCore
KF6::Crash
KF6::KIOCore
KF6::KIOWidgets
KF6::I18n
KF6::WidgetsAddons
KF6::XmlGui
Qt::PrintSupport
Qt::TextToSpeech
Qt::Widgets
Qt::Xml )
install(TARGETS kmouth ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
########### install files ###############
install( PROGRAMS org.kde.kmouth.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
install( FILES kmouthrc DESTINATION ${KDE_INSTALL_CONFDIR} )
install(FILES org.kde.kmouth.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
ki18n_install(po)
kdoctools_install(po)
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|