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

3
project(DragonPlayer)
4 5

# KDE Application Version, managed by release script
6
set(KDE_APPLICATIONS_VERSION_MAJOR "19")
7
set(KDE_APPLICATIONS_VERSION_MINOR "03")
Harald Sitter's avatar
Harald Sitter committed
8
set(KDE_APPLICATIONS_VERSION_MICRO "70")
9 10 11 12
set(KDE_APPLICATIONS_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}")

set(PROJECT_VERSION ${KDE_APPLICATIONS_VERSION})

Anthony Fieroni's avatar
Anthony Fieroni committed
13 14
set(QT_MIN_VERSION "5.6.0")
set(KF5_MIN_VERSION "5.31.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)

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

Ian Monroe's avatar
*qt3to4  
Ian Monroe committed
68
add_subdirectory( src/app )
Ian Monroe's avatar
Ian Monroe committed
69
add_subdirectory( misc )
Dirk Mueller's avatar
Dirk Mueller committed
70
add_subdirectory( doc )
Lukáš Tinkl's avatar
Lukáš Tinkl committed
71 72

feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)