CMakeLists.txt 1.89 KB
Newer Older
Laurent Montel's avatar
Laurent Montel committed
1
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
2

3
set(CMAKE_AUTOMOC ON)
4
5
6
if(${CMAKE_VERSION} VERSION_GREATER "3.10.0")
    cmake_policy(SET CMP0071 OLD)
endif()
7

8
# KDE Application Version, managed by release script
9
set (RELEASE_SERVICE_VERSION_MAJOR "20")
10
set (RELEASE_SERVICE_VERSION_MINOR "11")
11
set (RELEASE_SERVICE_VERSION_MICRO "70")
12
13
14
15
set (RELEASE_SERVICE_COMPACT_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}${RELEASE_SERVICE_VERSION_MINOR}${RELEASE_SERVICE_VERSION_MICRO}")
set (MINUET_VERSION "0.4.0.${RELEASE_SERVICE_COMPACT_VERSION}")

project(minuet VERSION ${MINUET_VERSION})
16

17
set(ECM_MIN_VERSION "5.15.0")
18
set(QT_MIN_VERSION "5.7.0")
19
20

find_package(ECM ${ECM_MIN_VERSION} CONFIG REQUIRED)
21
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}  ${minuet_SOURCE_DIR}/cmake)
22

23
include(GenerateExportHeader)
24
include(ECMSetupVersion)
25
include(ECMInstallIcons)
26
include(ECMAddAppIcon)
27
include(KDEClangFormat)
28
29
include(KDEInstallDirs)
include(KDECMakeSettings)
30
31
include(FeatureSummary)

32
ecm_setup_version(${MINUET_VERSION} VARIABLE_PREFIX MINUET
33
    VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/src/app/minuet_version.h"
34
35
)

36
37
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
    Core
38
39
    Gui
    Qml
40
    Quick
41
42
    QuickControls2
    Svg
43
)
44

45
46
47
48
49
IF(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Android")
    find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
        CoreAddons
        I18n
        Crash
50
        DocTools
51
    )
52
    find_package(FluidSynth 1.1.6 REQUIRED)
53
ENDIF(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Android")
54

55
include_directories(${minuet_SOURCE_DIR}/src/ ${minuet_BINARY_DIR}/src/)
56

57
add_subdirectory(src)
58
add_subdirectory(data)
59
60
IF(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Android")
    add_subdirectory(doc)
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
61
    ki18n_install(po)
62
63
    install(FILES org.kde.minuet.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
ENDIF(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Android")
Andreas Cord-Landwehr's avatar
Andreas Cord-Landwehr committed
64
65

feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)