File: CMakeLists.txt

package info (click to toggle)
kde-config-systemd 1.2.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 1,560 kB
  • ctags: 688
  • sloc: cpp: 3,306; makefile: 9; sh: 2
file content (64 lines) | stat: -rw-r--r-- 1,599 bytes parent folder | download
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
56
57
58
59
60
61
62
63
64
project(SYSTEMD-KCM)
set(PROJECT_VERSION "1.2.1")

cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
set(QT_MIN_VERSION "5.2.0")
set(KF5_MIN_VERSION "5.1.0")

# Silence a warning
cmake_policy(SET CMP0037 OLD)

find_package(ECM 1.1.0 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
             Widgets
             DBus)

find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
             Auth
             ConfigWidgets
             CoreAddons
             Crash
             I18n
             KIO
             WidgetsAddons)

include(KDEInstallDirs)
include(KDECompilerSettings)
include(KDECMakeSettings)
include(FeatureSummary)
include(CheckIncludeFiles)

find_package(PkgConfig REQUIRED)
pkg_check_modules(SYSTEMD "systemd" REQUIRED)

if(SYSTEMD_FOUND)
  # libsystemd-journal was merged into libsystemd in 209
  if(${SYSTEMD_VERSION} VERSION_LESS 209)
    pkg_check_modules(JOURNALD "libsystemd-journal" REQUIRED)
  else()
    pkg_check_modules(JOURNALD "libsystemd" REQUIRED)
  endif()
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions")
# Adding local CMake modules
set (
   CMAKE_MODULE_PATH
   ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules
   ${CMAKE_MODULE_PATH}
   )

configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/config.h)

add_definitions(-DTRANSLATION_DOMAIN=\"systemd-kcm\")

add_subdirectory(other)
add_subdirectory(src)

ki18n_install(po)

feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)