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

# Release Service version, managed by release script
4
set (RELEASE_SERVICE_VERSION_MAJOR "21")
5
set (RELEASE_SERVICE_VERSION_MINOR "07")
6
set (RELEASE_SERVICE_VERSION_MICRO "70")
7
8
9
10
11
12
13
14
15
set (RELEASE_SERVICE_COMPACT_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}${RELEASE_SERVICE_VERSION_MINOR}${RELEASE_SERVICE_VERSION_MICRO}")

# Bump GRANATIER_BASE_VERSION once new features are added
set(GRANATIER_BASE_VERSION "1.4")

set(GRANATIER_VERSION "${GRANATIER_BASE_VERSION}.${RELEASE_SERVICE_COMPACT_VERSION}")

project(granatier VERSION ${GRANATIER_VERSION})

16
17
set (QT_MIN_VERSION "5.12.0")
set (KF5_MIN_VERSION "5.68.0")
Laurent Montel's avatar
Laurent Montel committed
18

Laurent Montel's avatar
Laurent Montel committed
19
find_package(ECM ${KF5_MIN_VERSION} REQUIRED CONFIG)
20
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} )
Laurent Montel's avatar
Laurent Montel committed
21
22

find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Svg)
23
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Laurent Montel's avatar
Laurent Montel committed
24
    CoreAddons 
Harald Sitter's avatar
Harald Sitter committed
25
    Config
Frederik Schwarzer's avatar
Frederik Schwarzer committed
26
    Crash
Harald Sitter's avatar
Harald Sitter committed
27
    DBusAddons
Laurent Montel's avatar
Laurent Montel committed
28
29
30
31
32
    WidgetsAddons 
    Config 
    I18n 
    ConfigWidgets 
    XmlGui
Laurent Montel's avatar
Laurent Montel committed
33
34
    DocTools
)
Laurent Montel's avatar
Laurent Montel committed
35

36
find_package(KF5KDEGames 7.3.0 REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
37
38
39

include(KDEInstallDirs)
include(KDECMakeSettings)
40
include(KDECompilerSettings NO_POLICY_SCOPE)
41
42
43

include(FeatureSummary)
include(ECMInstallIcons)
44
include(ECMAddAppIcon)
Laurent Montel's avatar
Laurent Montel committed
45
include(ECMQtDeclareLoggingCategory)
46
include(ECMSetupVersion)
47

48
49
add_definitions(
    -DQT_NO_FOREACH
50
    -DQT_NO_KEYWORDS
51
52
53
54
55
56
57
    -DQT_NO_CAST_TO_ASCII
    -DQT_NO_CAST_FROM_ASCII
    -DQT_NO_URL_CAST_FROM_STRING
    -DQT_NO_CAST_FROM_BYTEARRAY
    -DQT_USE_QSTRINGBUILDER
    -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
    -DQT_STRICT_ITERATORS
58
)
59

60
61
add_subdirectory(themes) 
add_subdirectory(sounds)
62
add_subdirectory(icons)
63
64
65
add_subdirectory(src)
add_subdirectory(arenas)
add_subdirectory(players)
66
add_subdirectory(doc)
67

68
69
70
ki18n_install(po)
kdoctools_install(po)

71
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)