CMakeLists.txt 1.71 KB
Newer Older
1
# SPDX-FileCopyrightText: 2013-2016 Andreas Cord-Landwehr <cordlandwehr@kde.org>
2
# SPDX-License-Identifier: BSD-2-Clause
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
3 4 5

project(artikulate)

Laurent Montel's avatar
Laurent Montel committed
6
cmake_minimum_required(VERSION 3.5.0)
Laurent Montel's avatar
Laurent Montel committed
7
set(QT_MIN_VERSION "5.11.0")
8
set(KF5_MIN_VERSION "5.64.0")
Laurent Montel's avatar
Laurent Montel committed
9 10

find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
11
find_package(KF5DocTools)
12
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
13

14
include(KDEInstallDirs)
15
include(KDEClangFormat)
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
16
include(ECMAddTests)
17
include(KDECMakeSettings)
18
include(KDECompilerSettings NO_POLICY_SCOPE)
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
19
include(ECMInstallIcons)
20
include(ECMOptionalAddSubdirectory)
21
include(ECMSetupVersion)
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
22
include(ECMEnableSanitizers)
23
include(FeatureSummary)
24
include(GenerateExportHeader)
25

Laurent Montel's avatar
Laurent Montel committed
26
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS
27
    Widgets
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
28 29
    Sql
    XmlPatterns
30
    Qml
31
    Quick
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
32
    Test
33
)
Laurent Montel's avatar
Laurent Montel committed
34
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
35
    Archive
36
    Config
37
    Crash
38
    I18n
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
39
    NewStuff
40
    Kirigami2
41
)
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
42

43
# options
44 45
option(BUILD_QTMULTIMEDIA_PLUGIN "Build QtMultimedia sound backend" ON)
option(BUILD_GSTREAMER_PLUGIN "Build GStreamer sound backend" OFF)
46

47 48 49
add_definitions(
    -DQT_NO_URL_CAST_FROM_STRING
)
50

Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
51
# subdirectories to build
52
ecm_optional_add_subdirectory(data)
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
53
ecm_optional_add_subdirectory(doc)
54 55 56 57
ecm_optional_add_subdirectory(src)
ecm_optional_add_subdirectory(icons)
ecm_optional_add_subdirectory(libsound)
ecm_optional_add_subdirectory(liblearnerprofile)
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
58
ecm_optional_add_subdirectory(autotests)
59

Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
60
# files to install in the artikulate project root directory
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
61
k18n_install(po)
62
install(PROGRAMS org.kde.artikulate.desktop  DESTINATION ${XDG_APPS_INSTALL_DIR})
63
install(FILES org.kde.artikulate.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
64

65
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)