Changeset View
Changeset View
Standalone View
Standalone View
src/CMakeLists.txt
1 | add_subdirectory(helper) | 1 | add_subdirectory(helper) | ||
---|---|---|---|---|---|
2 | 2 | | |||
3 | set(kcmsystemd_SRCS kcmsystemd.cpp | 3 | set(kcmsystemd_SRCS kcmsystemd.cpp | ||
4 | unitmodel.cpp | 4 | unitmodel.cpp | ||
5 | sortfilterunitmodel.cpp | 5 | sortfilterunitmodel.cpp | ||
6 | confoption.cpp | 6 | confoption.cpp | ||
7 | confmodel.cpp | 7 | confmodel.cpp | ||
8 | confdelegate.cpp | 8 | confdelegate.cpp | ||
9 | confparms.cpp | 9 | confparms.cpp | ||
10 | fsutil.cpp) | 10 | fsutil.cpp) | ||
11 | 11 | | |||
12 | # Testing for C++0x/C++11 features | 12 | # Testing for C++0x/C++11 features | ||
13 | include (CheckCxxFeatures) | 13 | include (CheckCxxFeatures) | ||
14 | cxx_check_feature ("c++11" "std-chrono" "none" HAVE_CXX11_CHRONO "${ADDITIONAL_DEFINITIONS}") | 14 | cxx_check_feature ("c++11" "std-chrono" "none" HAVE_CXX11_CHRONO "${ADDITIONAL_DEFINITIONS}") | ||
15 | 15 | | |||
16 | # Fall back to boost::chrono if std::chrono feature detection failed | | |||
17 | if (NOT HAVE_CXX11_CHRONO) | | |||
18 | message (WARNING "Your C++ compiler does not support std::chrono properly, using boost::chrono instead.") | | |||
19 | find_package(Boost 1.45.0 COMPONENTS chrono system REQUIRED) | | |||
20 | endif () | | |||
21 | | ||||
22 | configure_file (kcm-systemd-features.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/kcm-systemd-features.h) | 16 | configure_file (kcm-systemd-features.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/kcm-systemd-features.h) | ||
23 | 17 | | |||
24 | include_directories (${CMAKE_CURRENT_BINARY_DIR}/src) | 18 | include_directories (${CMAKE_CURRENT_BINARY_DIR}/src) | ||
25 | 19 | | |||
26 | ki18n_wrap_ui(kcmsystemd_SRCS ../ui/kcmsystemd.ui) | 20 | ki18n_wrap_ui(kcmsystemd_SRCS ../ui/kcmsystemd.ui) | ||
27 | 21 | | |||
28 | add_library(kcm_systemd MODULE ${kcmsystemd_SRCS}) | 22 | add_library(kcm_systemd MODULE ${kcmsystemd_SRCS}) | ||
29 | target_link_libraries(kcm_systemd | 23 | target_link_libraries(kcm_systemd | ||
30 | KF5::Auth | 24 | KF5::Auth | ||
31 | KF5::ConfigWidgets | 25 | KF5::ConfigWidgets | ||
32 | KF5::CoreAddons | 26 | KF5::CoreAddons | ||
33 | KF5::Crash | 27 | KF5::Crash | ||
34 | KF5::I18n | 28 | KF5::I18n | ||
35 | KF5::KIOCore | 29 | KF5::KIOCore | ||
36 | KF5::WidgetsAddons | 30 | KF5::WidgetsAddons | ||
37 | ${Boost_LIBRARIES} | | |||
38 | ${JOURNALD_LIBRARIES}) | 31 | ${JOURNALD_LIBRARIES}) | ||
39 | install(TARGETS kcm_systemd DESTINATION ${CMAKE_INSTALL_PLUGINDIR}) | 32 | install(TARGETS kcm_systemd DESTINATION ${CMAKE_INSTALL_PLUGINDIR}) | ||
40 | 33 | | |||
41 | qt5_use_modules(kcm_systemd Widgets DBus) | 34 | qt5_use_modules(kcm_systemd Widgets DBus) |