aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
blob: ac3378aaa9fbc5f9c66641e748f2b7345cf28ec5 (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
set (SERVICE_LIB "libindicatordatetimeservice")
set (SERVICE_EXEC "indicator-datetime-service")

add_definitions (-DTIMEZONE_FILE="/etc/timezone"
                 -DG_LOG_DOMAIN="Indicator-Datetime")

add_library (${SERVICE_LIB} STATIC
             clock.c
             clock.h
             clock-live.c
             clock-live.h
             planner.c
             planner.h
             planner-eds.c
             planner-eds.h
             service.c
             service.h
             timezone.c
             timezone.h
             timezone-file.c
             timezone-file.h
             timezone-geoclue.c
             timezone-geoclue.h
             utils.c
             utils.h
             dbus-shared.h
             settings-shared.h)
include_directories (${SERVICE_DEPS_INCLUDE_DIRS})
link_directories (${SERVICE_DEPS_LIBRARY_DIRS})

add_executable (${SERVICE_EXEC} main.c)
target_link_libraries (${SERVICE_EXEC} ${SERVICE_LIB} ${SERVICE_DEPS_LIBRARIES} ${GCOV_LIBS})
install (TARGETS ${SERVICE_EXEC} RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_PKGLIBEXECDIR})

# common properties
set_property (TARGET ${SERVICE_LIB} ${SERVICE_EXEC}
              APPEND_STRING PROPERTY COMPILE_FLAGS
              " -g ${CC_WARNING_ARGS} ${GCOV_FLAGS}")