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

Jan Grulich's avatar
Jan Grulich committed
3
4
project(xdg-desktop-portal-kde)

5
set(PROJECT_VERSION "5.18.4")
6
7
set(PROJECT_VERSION_MAJOR 5)

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

Jan Grulich's avatar
Jan Grulich committed
11
12
################# set KDE specific information #################

13
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
Jan Grulich's avatar
Jan Grulich committed
14
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
Jan Grulich's avatar
Jan Grulich committed
15
16
17

include(KDEInstallDirs)
include(KDECMakeSettings)
18
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
19
include(KDEClangFormat)
Jan Grulich's avatar
Jan Grulich committed
20
21
22

include(FeatureSummary)

23
24
25
26
27
find_package(PipeWire)
set_package_properties(PipeWire PROPERTIES
    TYPE OPTIONAL
    PURPOSE "Required for screencast portal"
)
Jan Grulich's avatar
Jan Grulich committed
28

29
30
find_package(GBM)
set_package_properties(GBM PROPERTIES
Jan Grulich's avatar
Jan Grulich committed
31
    TYPE OPTIONAL
32
    PURPOSE "Required for screencast portal"
Jan Grulich's avatar
Jan Grulich committed
33
34
)

35
36
find_package(Epoxy)
set_package_properties(Epoxy PROPERTIES DESCRIPTION "libepoxy"
Yuri Chornoivan's avatar
Yuri Chornoivan committed
37
    URL "https://github.com/anholt/libepoxy"
Jan Grulich's avatar
Jan Grulich committed
38
    TYPE OPTIONAL
39
    PURPOSE "Required for screencast portal"
Jan Grulich's avatar
Jan Grulich committed
40
41
)

Jan Grulich's avatar
Jan Grulich committed
42
if (PipeWire_FOUND AND GBM_FOUND AND Epoxy_FOUND)
Jan Grulich's avatar
Jan Grulich committed
43
44
45
46
47
48
49
50
    set (SCREENCAST_ENABLED true)
else()
    set (SCREENCAST_ENABLED false)
endif()
add_definitions(-DSCREENCAST_ENABLED=${SCREENCAST_ENABLED})

add_feature_info ("Screencast portal" ${SCREENCAST_ENABLED} "Support for screen sharing")

Jan Grulich's avatar
Jan Grulich committed
51
52
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
    Core
53
    Concurrent
Jan Grulich's avatar
Jan Grulich committed
54
    DBus
55
    PrintSupport
Jan Grulich's avatar
Jan Grulich committed
56
    QuickWidgets
Jan Grulich's avatar
Jan Grulich committed
57
58
59
    Widgets
)

60
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
61
    CoreAddons
Jan Grulich's avatar
Jan Grulich committed
62
    Config
Jan Grulich's avatar
Jan Grulich committed
63
    I18n
Jan Grulich's avatar
Jan Grulich committed
64
    Declarative
65
    KIO
Jan Grulich's avatar
Jan Grulich committed
66
    Kirigami2
Jan Grulich's avatar
Jan Grulich committed
67
    Notifications
Jan Grulich's avatar
Jan Grulich committed
68
    Plasma
Jan Grulich's avatar
Jan Grulich committed
69
    Wayland
Jan Grulich's avatar
Jan Grulich committed
70
    WidgetsAddons
71
    WindowSystem
Jan Grulich's avatar
Jan Grulich committed
72
73
)

Jan Grulich's avatar
Jan Grulich committed
74
75
76
add_subdirectory(data)
add_subdirectory(src)

77
78
79
80
# 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})

Jan Grulich's avatar
Jan Grulich committed
81
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)