CMakeLists.txt 5.82 KB
Newer Older
1
###
2
#  Copyright 2013-2015  Andreas Cord-Landwehr <cordlandwehr@kde.org>
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#
#  Redistribution and use in source and binary forms, with or without
#  modification, are permitted provided that the following conditions
#  are met:
#
#  1. Redistributions of source code must retain the above copyright
#     notice, this list of conditions and the following disclaimer.
#  2. Redistributions in binary form must reproduce the above copyright
#     notice, this list of conditions and the following disclaimer in the
#     documentation and/or other materials provided with the distribution.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
#  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
#  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
#  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
#  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
#  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
#  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
#  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
#  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
#  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
###
25

Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
26
ecm_setup_version(0.6.1
27
28
29
30
    VARIABLE_PREFIX ARTIKULATE
    VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/version.h"
    PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/ArtikulateConfigVersion.cmake"
)
31

32
ecm_optional_add_subdirectory(qml)
33

Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
34
35
36
# set include directories
include_directories(
    ${CMAKE_CURRENT_BINARY_DIR}
37
    ${artikulate_SOURCE_DIR}
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
38
39
)

40
# set the source code files from which Artikulate is compiled
41
set(artikulateCore_SRCS
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
42
    core/course.cpp
43
    core/resourcemanager.cpp
44
    core/language.cpp
45
    core/phrase.cpp
46
47
    core/phoneme.cpp
    core/phonemegroup.cpp
48
    core/unit.cpp
49
    core/skeleton.cpp
50
    core/editorsession.cpp
51
    core/trainingsession.cpp
52
53
    core/resources/resourceinterface.cpp
    core/resources/languageresource.cpp
54
    core/resources/courseresource.cpp
55
    core/resources/skeletonresource.cpp
56
    core/player.cpp
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
57
    core/recorder.cpp
58
59
60
61
62

    qmlcontrols/iconitem.cpp
    qmlcontrols/imagetexturescache.cpp
    qmlcontrols/managedtexturenode.cpp

63
    artikulate_debug.cpp
64
)
65

66
67
kconfig_add_kcfg_files (artikulateCore_SRCS settings.kcfgc)
add_library(artikulatecore SHARED ${artikulateCore_SRCS})
68
generate_export_header(artikulatecore BASE_NAME artikulatecore)
69
target_link_libraries(artikulatecore
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
70
    LINK_PUBLIC
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
71
        artikulatelearnerprofile
72
        artikulatesound
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
73
        Qt5::XmlPatterns
74
        Qt5::Quick
75
        KF5::Archive
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
76
        KF5::ConfigGui
77
)
78
79
80
# internal library without any API or ABI guarantee
set(GENERIC_LIB_VERSION "0")
set(GENERIC_LIB_SOVERSION "0")
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
81
set_target_properties(
82
83
84
    artikulatecore PROPERTIES
    VERSION ${GENERIC_LIB_VERSION}
    SOVERSION ${GENERIC_LIB_SOVERSION}
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
85
86
87
88
89
)
install(
    TARGETS artikulatecore
    DESTINATION ${INSTALL_TARGETS_DEFAULT_ARGS}
)
90
install(FILES artikulate.knsrc  DESTINATION  ${CONFIG_INSTALL_DIR})
91

92
# set the source code files from which Artikulate is compiled
93
94
95
96
set(artikulate_SRCS
    main.cpp
    mainwindow.cpp
    application.cpp
97
    artikulate_debug.cpp
98

Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
99
    models/coursemodel.cpp
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
100
    models/coursefiltermodel.cpp
101
    models/languagemodel.cpp
102
    models/languageresourcemodel.cpp
103
#     models/learningprogressmodel.cpp //TODO must be adapted to new trainingsession
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
104
    models/unitmodel.cpp
105
    models/unitfiltermodel.cpp
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
106
    models/phrasemodel.cpp
107
    models/phraselistmodel.cpp
108
    models/phrasefiltermodel.cpp
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
109
    models/phonememodel.cpp
110
111
    models/phonemegroupmodel.cpp
    models/phonemeunitmodel.cpp
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
112
    models/profilemodel.cpp
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
113
    models/skeletonmodel.cpp
114

Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
115
    ui/sounddevicedialogpage.cpp
116
    ui/appearencedialogpage.cpp
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
117
    ui/resourcesdialogpage.cpp
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
118
)
119
ki18n_wrap_ui (artikulate_SRCS
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
120
121
    ui/resourcesdialogpage.ui
    ui/sounddevicedialogpage.ui
122
    ui/appearencedialogpage.ui
123
)
124
qt5_add_resources(artikulate_SRCS qml/qml.qrc)
125
kconfig_add_kcfg_files (artikulate_SRCS settings.kcfgc)
126
127
128

set(artikulate_editor_SRCS
    main_editor.cpp
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
129
    mainwindow_editor.cpp
130
    application.cpp
131
    artikulate_debug.cpp
132

133
134
135
136
    models/coursemodel.cpp
    models/coursefiltermodel.cpp
    models/languagemodel.cpp
    models/languageresourcemodel.cpp
137
#     models/learningprogressmodel.cpp //TODO must be adapted to new trainingsession
138
139
    models/unitmodel.cpp
    models/unitfiltermodel.cpp
140
    models/phrasemodel.cpp
141
    models/phraselistmodel.cpp
142
143
144
145
146
147
148
149
150
151
    models/phrasefiltermodel.cpp
    models/phonememodel.cpp
    models/phonemegroupmodel.cpp
    models/phonemeunitmodel.cpp
    models/profilemodel.cpp
    models/skeletonmodel.cpp

    ui/sounddevicedialogpage.cpp
    ui/appearencedialogpage.cpp
    ui/resourcesdialogpage.cpp
152
    ui/exportghnsdialog.cpp
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
153
)
154
ki18n_wrap_ui (artikulate_editor_SRCS
155
    ui/appearencedialogpage.ui
156
    ui/exportghnsdialog.ui
157
158
    ui/resourcesdialogpage.ui
    ui/sounddevicedialogpage.ui
159
)
160
qt5_add_resources(artikulate_editor_SRCS qml/qml.qrc)
161
162
163
kconfig_add_kcfg_files (artikulate_editor_SRCS settings.kcfgc)

# executables
164
add_executable(artikulate ${artikulate_SRCS})
165
target_link_libraries(artikulate
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
166
    LINK_PUBLIC
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
167
        artikulatelearnerprofile
168
169
        artikulatesound
        artikulatecore
170
        Qt5::Qml
171
        Qt5::Quick
172
        KF5::Crash
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
173
        KF5::NewStuff
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
174
        KF5::XmlGui
175
)
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
176

177
qt5_add_resources(artikulate_editor_SRCS editor.qrc)
178
179
180
181
182
183
184
185
add_executable(artikulate_editor ${artikulate_editor_SRCS})
target_link_libraries(artikulate_editor
    LINK_PUBLIC
        artikulatesound
        artikulatecore
        Qt5::Qml
        Qt5::Quick
        Qt5::QuickWidgets
186
        KF5::Crash
187
188
        KF5::NewStuff
        KF5::XmlGui
189
)
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
190

191
install(FILES artikulate.kcfg DESTINATION ${KCFG_INSTALL_DIR})
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
192
install(TARGETS artikulate ${INSTALL_TARGETS_DEFAULT_ARGS})
193
install(TARGETS artikulate_editor ${INSTALL_TARGETS_DEFAULT_ARGS})