CMakeLists.txt 1.61 KB
Newer Older
1
cmake_minimum_required (VERSION 3.5 FATAL_ERROR)
2
3

# KDE Application Version, managed by release script
4
5
6
7
set(RELEASE_SERVICE_VERSION_MAJOR "20")
set(RELEASE_SERVICE_VERSION_MINOR "03")
set(RELEASE_SERVICE_VERSION_MICRO "70")
set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
8

9
project(kdiamond VERSION ${RELEASE_SERVICE_VERSION})
10

11
12
set (QT_MIN_VERSION "5.10.0")
set (KF5_MIN_VERSION "5.46.0")
Laurent Montel's avatar
Laurent Montel committed
13

14
find_package(ECM ${KF5_MIN_VERSION} REQUIRED CONFIG)
Laurent Montel's avatar
Laurent Montel committed
15
16
17
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})

find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets )
Frederik Schwarzer's avatar
Frederik Schwarzer committed
18
19
20
21
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
    CoreAddons
    Config
    Crash
Michael Palimaka's avatar
Michael Palimaka committed
22
23
    DBusAddons
    DocTools
Frederik Schwarzer's avatar
Frederik Schwarzer committed
24
25
26
27
    WidgetsAddons
    Config
    I18n
    ConfigWidgets
Laurent Montel's avatar
Laurent Montel committed
28
    XmlGui
Michael Palimaka's avatar
Michael Palimaka committed
29
    Notifications
Frederik Schwarzer's avatar
Frederik Schwarzer committed
30
31
32
    NotifyConfig
)

Laurent Montel's avatar
Laurent Montel committed
33
34
35
36
37
find_package(KF5KDEGames 4.9.0 REQUIRED)

include(FeatureSummary)
include(ECMInstallIcons)
include(KDEInstallDirs)
Laurent Montel's avatar
Laurent Montel committed
38
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
Laurent Montel's avatar
Laurent Montel committed
39
include(KDECMakeSettings)
40
include(ECMAddAppIcon)
41
include(ECMSetupVersion)
42
43
44
45
if (${KF5Config_VERSION} STRGREATER "5.56.0")
        add_definitions(-DQT_NO_FOREACH)
        MESSAGE(STATUS "compile without foreach")
endif()
46
47
48
49
if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
   add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
   add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x060000)
endif()
Laurent Montel's avatar
Laurent Montel committed
50

51
add_subdirectory(src)
52
add_subdirectory(sounds)
Albert Astals Cid's avatar
Albert Astals Cid committed
53
add_subdirectory(themes)
54
add_subdirectory(doc)
55
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)