-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
47 lines (34 loc) · 1.46 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
# SPDX-License-Identifier: BSD-2-Clause
# SPDX-FileCopyrightText: 2023 Mikhail Morozov <2002morozik@gmail.com>
cmake_minimum_required(VERSION 3.16)
project(ksystemstats_scripts)
set(PROJECT_VERSION "5.27.80")
set(QT_MIN_VERSION "5.15.2")
set(KF5_MIN_VERSION "5.102.0")
set(KDE_COMPILERSETTINGS_LEVEL "5.82")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
include(CheckIncludeFiles)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDEClangFormat)
include(FeatureSummary)
include(ECMDeprecationSettings)
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS CoreAddons)
find_package(KSysGuard REQUIRED)
ecm_set_disabled_deprecation_versions(
QT 5.15.2
KF 5.101
)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(KSYSTEMSTATS_PLUGIN_INSTALL_DIR ${KDE_INSTALL_PLUGINDIR}/ksystemstats)
add_library(ksystemstats_plugin_scripts MODULE scripts.cpp)
if(NOT (CMAKE_BUILD_TYPE STREQUAL "Debug"))
target_compile_definitions(ksystemstats_plugin_scripts PUBLIC -DQT_NO_DEBUG_OUTPUT)
endif()
target_link_libraries(ksystemstats_plugin_scripts KF5::CoreAddons KF5::I18n KSysGuard::SystemStats)
install(TARGETS ksystemstats_plugin_scripts DESTINATION ${KSYSTEMSTATS_PLUGIN_INSTALL_DIR})
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)