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

Sebastian Kügler's avatar
Merge    
Sebastian Kügler committed
3
project(kdeplasma-addons)
4
set(PROJECT_VERSION "5.20.0")
5
set(PROJECT_VERSION_MAJOR 5)
6
7
8
9
10

################# Disallow in-source build #################
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
   message(FATAL_ERROR "plasma requires an out of source build. Please create a separate build directory and run 'cmake path_to_plasma [options]' there.")
endif()
11

12
set(QT_MIN_VERSION 5.12.0)
13
set(KF5_MIN_VERSION 5.72.0)
14

Nicolas Fella's avatar
Nicolas Fella committed
15
16
17
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

18
include(FeatureSummary)
19

20
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
Hrvoje Senjan's avatar
Hrvoje Senjan committed
21
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
22

23
24
include(KDEInstallDirs)
include(KDECMakeSettings)
25
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
26
include(ECMQtDeclareLoggingCategory)
27
include(ECMInstallIcons)
28
include(KDEPackageAppTemplates)
29
include(GenerateExportHeader)
30
include(CMakePackageConfigHelpers)
31
include(KDEClangFormat)
Shaun Reich's avatar
Shaun Reich committed
32

33
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED
34
35
36
37
38
39
    Core
    Gui
    DBus
    Quick
    Qml
    Widgets
Alexander Lohnau's avatar
Alexander Lohnau committed
40
    Test
41
)
42

Hrvoje Senjan's avatar
Hrvoje Senjan committed
43
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
44
45
46
    Archive
    Config
    CoreAddons
47
48
    Declarative
    Holidays
49
50
51
52
    I18n
    IconThemes
    KIO
    KCMUtils
53
    Kross
54
55
56
57
58
59
60
61
62
    Notifications
    Plasma
    Runner
    Service
    Sonnet
    UnitConversion
    WindowSystem
    NewStuff
)
63

64
65
66
67
68
69
70
71
find_package(KF5Purpose CONFIG QUIET)
set_package_properties(KF5Purpose PROPERTIES
    DESCRIPTION "Framework for cross-application services and actions"
    PURPOSE "Needed for QuickShare applet"
    URL "https://commits.kde.org/purpose"
    TYPE RUNTIME
)

72
73
74
75
add_definitions(
    -DQT_DEPRECATED_WARNINGS
    -DQT_NO_URL_CAST_FROM_STRING
)
76

77
78
79
#########################################################################

################# list the subdirectories #################
Bhushan Shah's avatar
Bhushan Shah committed
80
add_subdirectory(applets)
81
add_subdirectory(dataengines)
Marco Martin's avatar
Marco Martin committed
82
add_subdirectory(runners)
Aleix Pol Gonzalez's avatar
Aleix Pol Gonzalez committed
83

84
add_subdirectory(wallpapers)
Sebastian Kügler's avatar
Merge    
Sebastian Kügler committed
85

86
add_subdirectory(windowswitchers)
87
add_subdirectory(desktopswitchers)
Aleix Pol Gonzalez's avatar
Aleix Pol Gonzalez committed
88

89
90
add_subdirectory(plasmacalendarplugins)

91
92
add_subdirectory(templates)

93
94
95
96
# add clang-format target for all our real source files
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES *.cpp *.h)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})

97
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)