CMakeLists.txt 2.75 KB
Newer Older
Ivan Čukić's avatar
Ivan Čukić committed
1
# vim:set softtabstop=3 shiftwidth=3 tabstop=3 expandtab:
2

3
4
# Boosting us a bit

5
6
find_package (Boost 1.49 REQUIRED)
include_directories (${Boost_INCLUDE_DIR})
7

8
string (REGEX MATCH "1053.." BOOST_VERSION_BLACKLISTED ${Boost_VERSION})
9

10
11
12
13
14
15
16
if (BOOST_VERSION_BLACKLISTED AND NOT KACTIVITIES_ENABLE_EXCEPTIONS)
   message (
      WARNING
      "Boost.Container 1.53 has issues when exceptions are disabled. "
      "We will set the KACTIVITIES_ENABLE_EXCEPTIONS option."
      )
   set (KACTIVITIES_ENABLE_EXCEPTIONS ON)
17
endif ()
18

19
if (KACTIVITIES_ENABLE_EXCEPTIONS)
20
21
22
   string (REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
   add_definitions (-fexceptions)
endif ()
23

Ivan Čukić's avatar
Ivan Čukić committed
24
25
# =======================================================
# Starting the actual project definition
Ivan Čukić's avatar
Ivan Čukić committed
26

Ivan Čukić's avatar
Ivan Čukić committed
27
# Config file
28
29
set (KAMD_PLUGIN_VERSION 1)
set (KAMD_PLUGIN_DIR "kactivitymanagerd/${KAMD_PLUGIN_VERSION}")
30
set (KAMD_FULL_PLUGIN_DIR "${KDE_INSTALL_FULL_PLUGINDIR}/${KAMD_PLUGIN_DIR}/")
Ivan Čukić's avatar
Ivan Čukić committed
31
configure_file (kactivities-features.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/kactivities-features.h)
32

33
include_directories (
34
35
36
   ${CMAKE_CURRENT_BINARY_DIR}
   ${CMAKE_CURRENT_SOURCE_DIR}
   )
Ivan Čukić's avatar
Ivan Čukić committed
37

Ivan Čukić's avatar
Ivan Čukić committed
38
39
# Is the compiler modern enough to build the ActivityManager service
# and accompanying workspace addons?
Ivan Čukić's avatar
Ivan Čukić committed
40

41
42
string (COMPARE EQUAL "${CXX_FEATURES_UNSUPPORTED}" "" CXX_COMPILER_IS_MODERN)

43
44
45
46
47
48
49
50
51
52
53
54
# The compiler is good enough
if (CXX_COMPILER_IS_MODERN)
   message (STATUS
      "C++11 enabled compiler: Your compiler is state-of-the-art"
      )
else ()
   message (STATUS
      "C++11 enabled compiler:"
      "Your compiler doesn't support the following features: ${CXX_FEATURES_UNSUPPORTED} but
      the list of the supported ones is sufficient for the build: ${CXX_FEATURES_SUPPORTED}"
      )
endif ()
Ivan Čukić's avatar
Ivan Čukić committed
55

Henri Chain's avatar
Henri Chain committed
56
57
58
59
60
61
62
63
64
65

# D-Bus activation service file, and associated systemd service
ecm_generate_dbus_service_file(
   NAME org.kde.ActivityManager
   EXECUTABLE "${KDE_INSTALL_FULL_LIBEXECDIR}/kactivitymanagerd"
   SYSTEMD_SERVICE plasma-kactivitymanagerd.service
   DESTINATION ${KDE_INSTALL_DBUSSERVICEDIR}
)
ecm_install_configured_files(
   INPUT plasma-kactivitymanagerd.service.in
66
   DESTINATION ${KDE_INSTALL_SYSTEMDUSERUNITDIR}
Henri Chain's avatar
Henri Chain committed
67
)
68

69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
ecm_qt_declare_logging_category(debug_SRCS
   HEADER DebugActivities.h
   IDENTIFIER KAMD_LOG_ACTIVITIES
   CATEGORY_NAME org.kde.kactivities.activities
   DEFAULT_SEVERITY Warning)
ecm_qt_declare_logging_category(debug_SRCS
   HEADER DebugResources.h
   IDENTIFIER KAMD_LOG_RESOURCES
   CATEGORY_NAME org.kde.kactivities.resources
   DEFAULT_SEVERITY Warning)
ecm_qt_declare_logging_category(debug_SRCS
   HEADER DebugApplication.h
   IDENTIFIER KAMD_LOG_APPLICATION
   CATEGORY_NAME org.kde.kactivities.application
   DEFAULT_SEVERITY Warning)

85
86
ecm_setup_qtplugin_macro_names(JSON_ARG3 "KAMD_EXPORT_PLUGIN")

87
add_subdirectory (service)
88