-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
55 lines (43 loc) · 1.4 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
cmake_minimum_required(VERSION 3.19)
project("PowerManager"
VERSION "0.9.0"
DESCRIPTION "Power management support"
LANGUAGES CXX C
)
## Only build on the appropriate platforms.
if(NOT UNIX OR ANDROID)
message(NOTICE "Skipping the build as the condition \"UNIX OR ANDROID\" is not met.")
return()
endif()
## ECM:
find_package(ECM 5.245.0 REQUIRED NO_MODULE)
list(APPEND CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
## Installation directories:
include(KDEInstallDirs)
## Compiler settings:
set(KDE_SKIP_NULLPTR_WARNINGS_SETTINGS TRUE)
include(KDECompilerSettings NO_POLICY_SCOPE)
## CMake settings:
include(KDECMakeSettings)
## QML module:
include(ECMQmlModule)
## Disable use of C++ API deprecated in Qt 5.15
add_compile_definitions(QT_DISABLE_DEPRECATED_UP_TO=0x050F00)
## Features:
include(features.cmake)
## Features:
option(LIRI_ENABLE_SYSTEMD "Enable systemd support" ON)
add_feature_info("Liri::Systemd" LIRI_ENABLE_SYSTEMD "Enable systemd support")
## Variables:
if(LIRI_ENABLE_SYSTEMD)
set(INSTALL_SYSTEMDUSERUNITDIR "${KDE_INSTALL_LIBDIR}/systemd/user" CACHE PATH "systemd user unit directory [PREFIX/lib/systemd/user]")
endif()
## Add subdirectories:
add_subdirectory(data/settings)
if(LIRI_ENABLE_SYSTEMD)
add_subdirectory(data/systemd)
endif()
add_subdirectory(src/imports/power)
add_subdirectory(src/daemon)
add_subdirectory(src/settings/power)
#add_subdirectory(src/statusarea/power)