blob: a466a48738e7f658355e66b6bc4fc5e10826b17e (
plain)
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
65
66
67
68
|
set (SERVICE_LIB "indicatordatetimeservice")
set (SERVICE_EXEC "indicator-datetime-service")
add_definitions (-DTIMEZONE_FILE="/etc/timezone"
-DG_LOG_DOMAIN="Indicator-Datetime")
# handwritten sources
set (SERVICE_C_SOURCES
utils.c)
set (SERVICE_CXX_SOURCES
actions.cpp
actions-live.cpp
alarm-queue-simple.cpp
awake.cpp
appointment.cpp
clock.cpp
clock-live.cpp
date-time.cpp
engine-eds.cpp
exporter.cpp
formatter.cpp
formatter-desktop.cpp
haptic.cpp
locations.cpp
locations-settings.cpp
menu.cpp
notifications.cpp
planner-month.cpp
planner-range.cpp
planner-upcoming.cpp
settings-live.cpp
snap.cpp
sound.cpp
timezone-file.cpp
timezone-geoclue.cpp
timezones-live.cpp
utils.c
wakeup-timer-mainloop.cpp)
if (HAVE_UBUNTU_HW_ALARM_H)
set (SERVICE_CXX_SOURCES ${SERVICE_CXX_SOURCES} wakeup-timer-uha.cpp)
endif ()
# generated sources
include (GdbusCodegen)
set(SERVICE_GENERATED_SOURCES)
add_gdbus_codegen(SERVICE_GENERATED_SOURCES dbus-alarm-properties
com.canonical.indicator
${CMAKE_SOURCE_DIR}/data/com.canonical.indicator.datetime.AlarmProperties.xml)
# add warnings/coverage info on handwritten files
# but not the autogenerated ones...
set_source_files_properties(${SERVICE_CXX_SOURCES}
PROPERTIES COMPILE_FLAGS "${CXX_WARNING_ARGS} ${GCOV_FLAGS} -g -std=c++11")
set_source_files_properties(${SERVICE_C_SOURCES}
PROPERTIES COMPILE_FLAGS "${CXX_WARNING_ARGS} ${GCOV_FLAGS} -g -std=c99")
# add the bin dir to our include path so our code can find the generated header files
include_directories (${CMAKE_CURRENT_BINARY_DIR})
add_library (${SERVICE_LIB} STATIC ${SERVICE_C_SOURCES} ${SERVICE_CXX_SOURCES} ${SERVICE_GENERATED_SOURCES})
include_directories (${CMAKE_SOURCE_DIR})
link_directories (${SERVICE_DEPS_LIBRARY_DIRS})
add_executable (${SERVICE_EXEC} main.cpp)
set_source_files_properties(${SERVICE_SOURCES} main.cpp PROPERTIES COMPILE_FLAGS "${CXX_WARNING_ARGS} -g -std=c++11")
target_link_libraries (${SERVICE_EXEC} ${SERVICE_LIB} ${SERVICE_DEPS_LIBRARIES} ${GCOV_LIBS})
install (TARGETS ${SERVICE_EXEC} RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_PKGLIBEXECDIR})
|