CMakeLists.txt 1.4 KB
Newer Older
1
cmake_minimum_required(VERSION 3.16)
2

3
project(kgamma)
4
set(PROJECT_VERSION "5.25.80")
5

6
set(QT_MIN_VERSION "5.15.2")
7
set(KF5_MIN_VERSION "5.98.0")
8
set(KDE_COMPILERSETTINGS_LEVEL "5.82")
9

10
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
11
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}  ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
12

David Edmundson's avatar
David Edmundson committed
13
14
include(KDEInstallDirs)
include(KDECMakeSettings)
15
include(KDECompilerSettings NO_POLICY_SCOPE)
David Edmundson's avatar
David Edmundson committed
16
include(FeatureSummary)
17
include(KDEClangFormat)
18
include(KDEGitCommitHooks)
19

Laurent Montel's avatar
Laurent Montel committed
20
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Widgets)
David Edmundson's avatar
David Edmundson committed
21

22
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
23
24
    Config
    ConfigWidgets
25
    DocTools
26
    I18n
David Edmundson's avatar
David Edmundson committed
27
)
28

29
find_package(X11 REQUIRED COMPONENTS xf86vmode)
30

Pino Toscano's avatar
Pino Toscano committed
31
# X11_xf86vmode discovery is done by FindX11
Hrvoje Senjan's avatar
Hrvoje Senjan committed
32
add_feature_info("X11_xf86vmode" X11_xf86vmode_FOUND "Required to build kgamma.")
33

David Edmundson's avatar
David Edmundson committed
34
include_directories(${CMAKE_CURRENT_BINARY_DIR})
35

36
37
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f02)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055900)
38

Pino Toscano's avatar
Pino Toscano committed
39
add_subdirectory(kcmkgamma)
David Edmundson's avatar
David Edmundson committed
40
# add_subdirectory(xf86gammacfg)
Pino Toscano's avatar
Pino Toscano committed
41
add_subdirectory(doc)
42

43
44
45
# 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})
46
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
47

Hrvoje Senjan's avatar
Hrvoje Senjan committed
48
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)