CMakeLists.txt 2.16 KB
Newer Older
1
project(kde-gtk-config)
2
set(PROJECT_VERSION "5.21.80")
3
cmake_minimum_required(VERSION 3.16)
4

Nicolas Fella's avatar
Nicolas Fella committed
5
6
7
8
9
10
11
set(QT_MIN_VERSION "5.15.0")
set(KF5_MIN_VERSION "5.78")

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
12
13
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${ECM_MODULE_PATH})

Nicolas Fella's avatar
Nicolas Fella committed
14
15
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS DBus Svg)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS CoreAddons Config ConfigWidgets GuiAddons DBusAddons)
16
find_package(PkgConfig REQUIRED)
17
find_package(KDecoration2 REQUIRED)
18
find_package(GSettingSchemas REQUIRED)
19
find_package(Sass REQUIRED)
20
find_package(XSettingsd)
21

22
23
24
25
26
27
pkg_check_modules(GTK+3 REQUIRED IMPORTED_TARGET gtk+-3.0)
pkg_check_modules(GTK+2 REQUIRED IMPORTED_TARGET gtk+-2.0)
pkg_check_modules(GLib2 REQUIRED IMPORTED_TARGET glib-2.0)
pkg_check_modules(GObject REQUIRED IMPORTED_TARGET gobject-2.0)
pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)

28
29
30
31
32
33
34
include(ECMSetupVersion)
include(ECMInstallIcons)
include(ECMMarkAsTest)
include(GenerateExportHeader)
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
35
include(KDECompilerSettings NO_POLICY_SCOPE)
36
include(KDEClangFormat)
37
include(KDEGitCommitHooks)
38

39
40
41
set_package_properties(XSettingsd PROPERTIES
    DESCRIPTION "XSettingsd daemon"
    TYPE RUNTIME
42
    PURPOSE "Required to apply settings to GTK applications on the fly"
43
44
)

45
46
47
48
49
50
set_package_properties(Sass PROPERTIES
    DESCRIPTION "SASS compiler"
    URL "https://sass-lang.com/"
    PURPOSE "Required for building a modification, that allows Breeze GTK to change it's window decorations' appearance"
)

Mikhail Zolotukhin's avatar
Mikhail Zolotukhin committed
51
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake kded/config.h)
52

53
add_subdirectory(gtk3proxies)
54
add_subdirectory(kded)
55
add_subdirectory(kconf_update)
56
add_subdirectory(color-reload-module)
57
add_subdirectory(window-decorations-reload-module)
58

59
60
61
# 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})
62
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
63

64
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)