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 (41 lines) | stat: -rw-r--r-- 1,489 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
add_subdirectory(helper)

set(kcmsystemd_SRCS kcmsystemd.cpp
                    unitmodel.cpp
                    sortfilterunitmodel.cpp
                    confoption.cpp
                    confmodel.cpp
                    confdelegate.cpp
                    confparms.cpp
                    fsutil.cpp)

# Testing for C++0x/C++11 features
include (CheckCxxFeatures)
cxx_check_feature ("c++11" "std-chrono" "none" HAVE_CXX11_CHRONO "${ADDITIONAL_DEFINITIONS}")

# Fall back to boost::chrono if std::chrono feature detection failed
if (NOT HAVE_CXX11_CHRONO)
  message (WARNING "Your C++ compiler does not support std::chrono properly, using boost::chrono instead.")
  find_package(Boost 1.45.0 COMPONENTS chrono system REQUIRED)
endif ()

configure_file (kcm-systemd-features.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/kcm-systemd-features.h)

include_directories (${CMAKE_CURRENT_BINARY_DIR}/src)

ki18n_wrap_ui(kcmsystemd_SRCS ../ui/kcmsystemd.ui)

add_library(kcm_systemd MODULE ${kcmsystemd_SRCS})
target_link_libraries(kcm_systemd
                      KF5::Auth
                      KF5::ConfigWidgets
                      KF5::CoreAddons
                      KF5::Crash
                      KF5::I18n
                      KF5::KIOCore
                      KF5::WidgetsAddons
                      ${Boost_LIBRARIES}
                      ${JOURNALD_LIBRARIES})
install(TARGETS kcm_systemd DESTINATION ${CMAKE_INSTALL_PLUGINDIR})

qt5_use_modules(kcm_systemd Widgets DBus)