~neon/kmouth/master

487 by Jeremy Whiting
Initial port to kf5/qt5/QtSpeech.
1
cmake_minimum_required(VERSION 2.8.12)
2
218 by Laurent Montel
not necessary into svn
3
project(kmouth)
214 by Laurent Montel
Initial port to cmake build system ksayit/kttsd doesn't compile.
4
487 by Jeremy Whiting
Initial port to kf5/qt5/QtSpeech.
5
if(NOT MSVC)
6
    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Wall -Wno-switch -O2 -g")
7
    set(CMAKE_CXX_FLAGS_RELEASE "-Wall -Wno-switch -O2")
8
    set(CMAKE_CXX_FLAGS_DEBUG  "-Wall -Wno-switch -g3 -ggdb -O0" CACHE STRING "Debug options." FORCE)
9
endif(NOT MSVC)
10
11
include(FeatureSummary)
560 by Laurent Montel
Fix compile with KDEFrameworkCompilerSettings
12
13
set(QT_MIN_VERSION "5.9.0")
14
set(KF5_VERSION "5.46.0")
15
16
17
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Core PrintSupport TextToSpeech Xml Widgets)
18
19
find_package(ECM ${KF5_VERSION} NO_MODULE REQUIRED)
487 by Jeremy Whiting
Initial port to kf5/qt5/QtSpeech.
20
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
21
22
include(ECMAddAppIcon)
23
include(KDEInstallDirs)
24
include(KDECMakeSettings)
560 by Laurent Montel
Fix compile with KDEFrameworkCompilerSettings
25
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
487 by Jeremy Whiting
Initial port to kf5/qt5/QtSpeech.
26
include(ECMInstallIcons)
27
include(ECMAddAppIcon)
28
560 by Laurent Montel
Fix compile with KDEFrameworkCompilerSettings
29
find_package(KF5  ${KF5_VERSION} REQUIRED COMPONENTS
487 by Jeremy Whiting
Initial port to kf5/qt5/QtSpeech.
30
    Crash
500 by Jeremy Whiting
Remove KDE4LibsSupport dependency.
31
    Completion
487 by Jeremy Whiting
Initial port to kf5/qt5/QtSpeech.
32
    Config
33
    ConfigWidgets
34
    CoreAddons
35
    DocTools
500 by Jeremy Whiting
Remove KDE4LibsSupport dependency.
36
    I18n
487 by Jeremy Whiting
Initial port to kf5/qt5/QtSpeech.
37
    KIO
500 by Jeremy Whiting
Remove KDE4LibsSupport dependency.
38
    WidgetsAddons
39
    XmlGui
487 by Jeremy Whiting
Initial port to kf5/qt5/QtSpeech.
40
)
41
include_directories (${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
245 by Gary Cramblitt
ui v3 to 4
42
514 by David Faure
-DQT_NO_URL_CAST_FROM_STRING + fix compilation + fix cmdline arg handling
43
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
44
445 by Jeremy Paul Whiting
move documentation into app folders
45
add_subdirectory( doc )
484.1.1 by Jeremy Whiting
Start migrating away from Qt3Support classes.
46
add_subdirectory( icons )
47
add_subdirectory( books )
214 by Laurent Montel
Initial port to cmake build system ksayit/kttsd doesn't compile.
48
370 by Laurent Montel
Make it relative
49
include_directories(./wordcompletion/  )
214 by Laurent Montel
Initial port to cmake build system ksayit/kttsd doesn't compile.
50
51
52
########### next target ###############
53
490 by Jeremy Whiting
Simplify CMakeLists.txt
54
set(kmouth_SRCS
55
    ./phrasebook/phrasebookparser.cpp
56
    ./phrasebook/phrasebookdialog.cpp
57
    ./phrasebook/initialphrasebookwidget.cpp
58
    ./phrasebook/phrasebook.cpp
59
    ./wordcompletion/wordlist.cpp
60
    ./wordcompletion/wordcompletion.cpp
61
    ./wordcompletion/wordcompletionwidget.cpp
62
    ./wordcompletion/dictionarycreationwizard.cpp
63
    texttospeechconfigurationwidget.cpp
64
    optionsdialog.cpp
65
    configwizard.cpp
66
    phraselist.cpp
67
    speech.cpp
68
    texttospeechsystem.cpp
69
    kmouth.cpp
70
    main.cpp )
214 by Laurent Montel
Initial port to cmake build system ksayit/kttsd doesn't compile.
71
490 by Jeremy Whiting
Simplify CMakeLists.txt
72
ki18n_wrap_ui(kmouth_SRCS
73
    ./phrasebook/phrasebookdialog.ui
74
    ./wordcompletion/creationsourceui.ui
75
    ./wordcompletion/creationsourcedetailsui.ui
76
    ./wordcompletion/kdedocsourceui.ui
77
    ./wordcompletion/wordcompletionui.ui
78
    preferencesui.ui
79
    texttospeechconfigurationui.ui )
487 by Jeremy Whiting
Initial port to kf5/qt5/QtSpeech.
80
81
add_executable(kmouth ${kmouth_SRCS})
82
83
target_link_libraries(kmouth
500 by Jeremy Whiting
Remove KDE4LibsSupport dependency.
84
                      KF5::Completion
487 by Jeremy Whiting
Initial port to kf5/qt5/QtSpeech.
85
                      KF5::ConfigCore
500 by Jeremy Whiting
Remove KDE4LibsSupport dependency.
86
                      KF5::Crash
487 by Jeremy Whiting
Initial port to kf5/qt5/QtSpeech.
87
                      KF5::KIOCore
500 by Jeremy Whiting
Remove KDE4LibsSupport dependency.
88
                      KF5::KIOWidgets
487 by Jeremy Whiting
Initial port to kf5/qt5/QtSpeech.
89
                      KF5::I18n
500 by Jeremy Whiting
Remove KDE4LibsSupport dependency.
90
                      KF5::WidgetsAddons
91
                      KF5::XmlGui
92
                      Qt5::PrintSupport
487 by Jeremy Whiting
Initial port to kf5/qt5/QtSpeech.
93
                      Qt5::TextToSpeech
500 by Jeremy Whiting
Remove KDE4LibsSupport dependency.
94
                      Qt5::Widgets
95
                      Qt5::Xml )
214 by Laurent Montel
Initial port to cmake build system ksayit/kttsd doesn't compile.
96
394 by Laurent Montel
Use INSTALL_TARGETS_DEFAULT_ARGS
97
install(TARGETS kmouth  ${INSTALL_TARGETS_DEFAULT_ARGS} )
214 by Laurent Montel
Initial port to cmake build system ksayit/kttsd doesn't compile.
98
99
100
########### install files ###############
101
512 by Jeremy Whiting
Use org.kde. schema for .desktop file.
102
install( PROGRAMS org.kde.kmouth.desktop  DESTINATION  ${XDG_APPS_INSTALL_DIR} )
256 by Laurent Montel
Fix some install files (need to fix it when it will possible to compile this module)
103
install( FILES kmouthrc  DESTINATION  ${CONFIG_INSTALL_DIR} )
487 by Jeremy Whiting
Initial port to kf5/qt5/QtSpeech.
104
install( FILES kmouthui.rc  DESTINATION  ${KXMLGUI_INSTALL_DIR}/kmouth )
105
install( FILES phrasebookdialogui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kmouth )
529 by Burkhard Lück
Add appdata file for KMouth
106
install(FILES org.kde.kmouth.appdata.xml DESTINATION ${CMAKE_INSTALL_METAINFODIR})
214 by Laurent Montel
Initial port to cmake build system ksayit/kttsd doesn't compile.
107
511 by Nicolas Lécureuil
Add feature_summary macro
108
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
214 by Laurent Montel
Initial port to cmake build system ksayit/kttsd doesn't compile.
109