CMakeLists.txt 3 KB
Newer Older
Laurent Montel's avatar
Laurent Montel committed
1
cmake_minimum_required(VERSION 3.16)
2

3
project(kmouth)
4

5
6
7
8
9
10
11
12
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)

Laurent Montel's avatar
Laurent Montel committed
13
14
set(QT_MIN_VERSION "5.15.0")
set(KF5_MIN_VERSION "5.83.0")
15
16
17
18


find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Core PrintSupport TextToSpeech Xml Widgets)

19
find_package(ECM ${KF5_MIN_VERSION} NO_MODULE REQUIRED)
20
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
21
22
23
24

include(ECMAddAppIcon)
include(KDEInstallDirs)
include(KDECMakeSettings)
25
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
26
27
28
include(ECMInstallIcons)
include(ECMAddAppIcon)

29
find_package(KF5  ${KF5_MIN_VERSION} REQUIRED COMPONENTS
30
    Crash
31
    Completion
32
33
34
35
    Config
    ConfigWidgets
    CoreAddons
    DocTools
36
    I18n
37
    KIO
38
39
    WidgetsAddons
    XmlGui
40
41
)
include_directories (${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
Gary Cramblitt's avatar
Gary Cramblitt committed
42

43
add_subdirectory( doc )
44
45
add_subdirectory( icons )
add_subdirectory( books )
46

Laurent Montel's avatar
Laurent Montel committed
47
include_directories(./wordcompletion/  )
48
49
50


########### next target ###############
51
add_executable(kmouth)
52

53
target_sources(kmouth PRIVATE
Jeremy Whiting's avatar
Jeremy Whiting committed
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
    ./phrasebook/phrasebookparser.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 )

71
ki18n_wrap_ui(kmouth
Jeremy Whiting's avatar
Jeremy Whiting committed
72
73
74
75
76
77
78
    ./phrasebook/phrasebookdialog.ui
    ./wordcompletion/creationsourceui.ui
    ./wordcompletion/creationsourcedetailsui.ui
    ./wordcompletion/kdedocsourceui.ui
    ./wordcompletion/wordcompletionui.ui
    preferencesui.ui
    texttospeechconfigurationui.ui )
79
80


81
target_link_libraries(kmouth
82
                      KF5::Completion
83
                      KF5::ConfigCore
84
                      KF5::Crash
85
                      KF5::KIOCore
86
                      KF5::KIOWidgets
87
                      KF5::I18n
88
89
                      KF5::WidgetsAddons
                      KF5::XmlGui
Laurent Montel's avatar
Laurent Montel committed
90
91
92
93
                      Qt::PrintSupport
                      Qt::TextToSpeech
                      Qt::Widgets
                      Qt::Xml )
94

95
install(TARGETS kmouth  ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
96
97
98
99


########### install files ###############

100
101
102
103
104
install( PROGRAMS org.kde.kmouth.desktop  DESTINATION  ${KDE_INSTALL_APPDIR} )
install( FILES kmouthrc  DESTINATION  ${KDE_INSTALL_CONFDIR} )
install( FILES kmouthui.rc  DESTINATION  ${KDE_INSTALL_KXMLGUI5DIR}/kmouth )
install( FILES phrasebookdialogui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kmouth )
install(FILES org.kde.kmouth.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
105

Nicolas Lécureuil's avatar
Nicolas Lécureuil committed
106
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
107