set (SERVICE_LIB "indicatordatetimeservice")
set (SERVICE_EXEC "indicator-datetime-service")

SET (CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -std=c99   -g ${CXX_WARNING_ARGS} ${GCOV_FLAGS}")
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g ${CXX_WARNING_ARGS} ${GCOV_FLAGS}")

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

set (SERVICE_SOURCES
     actions.cpp
     actions-live.cpp
     alarm-queue-simple.cpp
     appointment.cpp
     clock.cpp
     clock-live.cpp
     date-time.cpp
     engine-eds.cpp
     exporter.cpp
     formatter.cpp
     formatter-desktop.cpp
     locations.cpp
     locations-settings.cpp
     menu.cpp
     planner-month.cpp
     planner-range.cpp
     planner-upcoming.cpp
     settings-live.cpp
     snap.cpp
     timezone-file.cpp
     timezone-geoclue.cpp
     timezones-live.cpp
     utils.c
     wakeup-timer-mainloop.cpp)

if (HAVE_UBUNTU_HW_ALARM_H)
  set (SERVICE_SOURCES ${SERVICE_SOURCES} wakeup-timer-uha.cpp)
endif ()

add_library (${SERVICE_LIB} STATIC ${SERVICE_SOURCES})
include_directories (${CMAKE_SOURCE_DIR})
link_directories (${SERVICE_DEPS_LIBRARY_DIRS})

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

