CMakeLists.txt 2.15 KB
Newer Older
1
2
cmake_minimum_required(VERSION 3.0)

3
# KDE Application Version, managed by release script
4
5
set(RELEASE_SERVICE_VERSION_MAJOR "21")
set(RELEASE_SERVICE_VERSION_MINOR "03")
6
7
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(DragonPlayer VERSION ${RELEASE_SERVICE_VERSION})
10

11
set(PROJECT_VERSION ${RELEASE_SERVICE_VERSION})
12

Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
13
14
set(QT_MIN_VERSION "5.12.0")
set(KF5_MIN_VERSION "5.66.0")
15

16
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
17
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
Lukáš Tinkl's avatar
Lukáš Tinkl committed
18
19
20

include(KDEInstallDirs)
include(KDECMakeSettings)
21
include(KDECompilerSettings NO_POLICY_SCOPE)
Lukáš Tinkl's avatar
Lukáš Tinkl committed
22
23
24
25
26
27
28
29
30
31

include(ECMInstallIcons)
include(ECMSetupVersion)
include(FeatureSummary)

find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
    Core
    Widgets
)

Anthony Fieroni's avatar
Anthony Fieroni committed
32
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
Harald Sitter's avatar
Harald Sitter committed
33
34
35
    Config
    ConfigWidgets
    CoreAddons
36
    Crash
Harald Sitter's avatar
Harald Sitter committed
37
38
    DBusAddons
    DocTools
Harald Sitter's avatar
Harald Sitter committed
39
    I18n
Harald Sitter's avatar
Harald Sitter committed
40
    JobWidgets
Harald Sitter's avatar
Harald Sitter committed
41
    KIO
42
    Parts
Harald Sitter's avatar
Harald Sitter committed
43
    Solid
Harald Sitter's avatar
Harald Sitter committed
44
45
    WidgetsAddons
    WindowSystem
Harald Sitter's avatar
Harald Sitter committed
46
    XmlGui
Anthony Fieroni's avatar
Anthony Fieroni committed
47
    Notifications
48
)
49
find_package(Phonon4Qt5 4.6.60 REQUIRED NO_MODULE)
50

Ian Monroe's avatar
Ian Monroe committed
51
include_directories(
52
53
54
55
    ${CMAKE_CURRENT_BINARY_DIR}/src
    ${CMAKE_CURRENT_BINARY_DIR}/src/app
    ${CMAKE_CURRENT_SOURCE_DIR}/src
    ${CMAKE_CURRENT_SOURCE_DIR}/src/app
56
    ${CMAKE_CURRENT_BINARY_DIR}
57
    )
Ian Monroe's avatar
*qt3to4    
Ian Monroe committed
58

59
include_directories(BEFORE SYSTEM ${PHONON_INCLUDES})
Lukáš Tinkl's avatar
Lukáš Tinkl committed
60

61
62
63
64
65
include(CheckIncludeFiles)
check_include_files(unistd.h HAVE_UNISTD_H)

configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)

66
67
add_definitions(
    -DQT_DEPRECATED_WARNINGS
68
    -DQT_DISABLE_DEPRECATED_BEFORE=0x050900
69
70
71
72
73
74
75
    -DQT_USE_QSTRINGBUILDER
    -DQT_NO_CAST_TO_ASCII
#     -DQT_NO_CAST_FROM_ASCII
    -DQT_NO_CAST_FROM_BYTEARRAY
    -DQT_STRICT_ITERATORS
    -DQT_NO_URL_CAST_FROM_STRING
    -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
76
    -DQT_NO_KEYWORDS
Friedrich W. H. Kossebau's avatar
Friedrich W. H. Kossebau committed
77
    -DQT_NO_FOREACH
78
79
)

Lukáš Tinkl's avatar
Lukáš Tinkl committed
80
81
add_definitions(-DTRANSLATION_DOMAIN="dragonplayer")

Ian Monroe's avatar
*qt3to4    
Ian Monroe committed
82
add_subdirectory( src/app )
Ian Monroe's avatar
Ian Monroe committed
83
add_subdirectory( misc )
Dirk Mueller's avatar
Dirk Mueller committed
84
add_subdirectory( doc )
Lukáš Tinkl's avatar
Lukáš Tinkl committed
85

86
ki18n_install(po)
87
kdoctools_install(po)
88

Lukáš Tinkl's avatar
Lukáš Tinkl committed
89
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)