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

3
project(PlasmaIntegration)
4
set(PROJECT_VERSION "5.18.4")
5
set(PROJECT_VERSION_MAJOR 5)
6

7
set(QT_MIN_VERSION "5.12.0")
8
set(KF5_MIN_VERSION "5.66.0")
9

10
find_package(ECM ${KF5_MIN_VERSION}  REQUIRED NO_MODULE)
David Edmundson's avatar
David Edmundson committed
11
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
12
13
14

include(KDEInstallDirs)
include(KDECMakeSettings)
15
16
17
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(FeatureSummary)
include(GenerateExportHeader)
18
include(KDEClangFormat)
19

20
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Widgets DBus X11Extras QuickControls2)
21
find_package(Qt5Gui ${QT_MIN_VERSION} CONFIG REQUIRED Private)
22

23
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
24
                Config ConfigWidgets I18n IconThemes KIO Notifications Wayland
25
                WidgetsAddons WindowSystem ConfigWidgets
26
)
27

28
29
30
find_package(XCB COMPONENTS XCB)
set_package_properties(XCB PROPERTIES
    DESCRIPTION "X protocol C-language Binding"
31
    URL "https://xcb.freedesktop.org"
32
33
34
35
    TYPE REQUIRED
    PURPOSE "Required to pass style properties to native Windows on X11 Platform"
)

36
find_package(Breeze 5 CONFIG)
37
38
39
40
set_package_properties(Breeze PROPERTIES
                       TYPE REQUIRED
                       PURPOSE "For setting the default QStyle name")

David Edmundson's avatar
David Edmundson committed
41
# dependencies for QPA plugin
Alexander Volkov's avatar
Alexander Volkov committed
42
43
find_package(Qt5ThemeSupport REQUIRED)
set(QT5PLATFORMSUPPORT_LIBS Qt5ThemeSupport::Qt5ThemeSupport)
David Edmundson's avatar
David Edmundson committed
44

Martin Flöser's avatar
Martin Flöser committed
45
add_definitions(-DTRANSLATION_DOMAIN=\"plasmaintegration5\")
46
47
48
if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
    ki18n_install(po)
endif()
49
50
51
52
add_subdirectory(src)
add_subdirectory(autotests)
add_subdirectory(tests)

53
54
55
56
57
58
59
60
61
find_package(FontNotoSans)
set_package_properties(FontNotoSans PROPERTIES
    PURPOSE "Default sans-serif font -- this is not detected automatically, pass -DCMAKE_DISABLE_FIND_PACKAGE_FontNotoSans=true to mark it ignored."
    URL "https://www.google.com/get/noto/"
    TYPE RUNTIME
)
find_package(FontHack)
set_package_properties(FontHack PROPERTIES
    PURPOSE "Default monospace font -- this is not detected automatically, pass -DCMAKE_DISABLE_FIND_PACKAGE_FontHack=true to mark it ignored."
62
    URL "https://sourcefoundry.org/hack/"
63
64
    TYPE RUNTIME
)
65

66
67
68
69
# 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})

70
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)