2 # Copyright (C) 2011, BMW AG
9 # @author: Christian Müller (christian.ei.mueller@bmw.de)
12 cmake_minimum_required(VERSION 2.6)
14 PROJECT(AudioManagerDeamon)
16 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic")
17 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
19 set(DOC_OUTPUT_PATH ${DOC_OUTPUT_PATH}/AudioManager)
20 set(INCLUDES_FOLDER "include")
22 pkg_check_modules(SQLITE REQUIRED sqlite3)
25 FIND_PACKAGE(DBUS REQUIRED)
26 ENDIF(WITH_DBUS_WRAPPER)
30 src/CommandReceiver.cpp
32 src/ControlReceiver.cpp
34 src/DatabaseHandler.cpp
35 src/DatabaseObserver.cpp
36 src/RoutingReceiver.cpp
42 src/CAmTelnetMenuHelper.cpp
46 SET (AUDIOMAN_SRCS_CXX
50 ENDIF(WITH_DBUS_WRAPPER)
52 IF(WITH_SOCKETHANDLER_LOOP)
53 SET (AUDIOMAN_SRCS_CXX
57 ENDIF(WITH_SOCKETHANDLER_LOOP)
61 ${CMAKE_CURRENT_BINARY_DIR}
63 ${AUDIO_INCLUDES_FOLDER}
68 INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES}
69 ${DBUS_ARCH_INCLUDE_DIR}
72 ENDIF(WITH_DBUS_WRAPPER)
74 ADD_EXECUTABLE(AudioManager ${AUDIOMAN_SRCS_CXX})
77 TARGET_LINK_LIBRARIES(AudioManager
82 ELSE(WITH_DBUS_WRAPPER)
83 TARGET_LINK_LIBRARIES(AudioManager
87 ENDIF(WITH_DBUS_WRAPPER)
90 add_subdirectory (test)
93 #IF(WITH_DOCUMENTATION)
94 # file(MAKE_DIRECTORY ${DOC_OUTPUT_PATH})
95 # configure_file(${DOXY_FILE} ${DOC_OUTPUT_PATH}/Doxyfile @ONLY IMMEDIATE)
96 # add_custom_target (Docs ALL
97 # COMMAND ${DOXYGEN_EXECUTABLE} ${DOC_OUTPUT_PATH}/Doxyfile WORKING_DIRECTORY ${DOC_OUTPUT_PATH}
98 # SOURCES ${PROJECT_BINARY_DIR} ${DOC_OUTPUT_PATH}/Doxyfile
100 #ENDIF(WITH_DOCUMENTATION)
102 INSTALL(TARGETS AudioManager
105 PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
109 INSTALL(DIRECTORY "${AUDIO_INCLUDES_FOLDER}/"
114 SET(ADD_DEPEND "sqlite3(>=3.6.22)" "dlt" "libdbus-1-3(>=1.2.16)")
115 set_property(GLOBAL APPEND PROPERTY bin_prop "${ADD_DEPEND}")
117 SET(ADD_DEPEND "audiomanager-bin" "sqlite3(>=3.6.22)" "dlt" "libdbus-1-3(>=1.2.16)")
118 set_property(GLOBAL APPEND PROPERTY dev_prop "${ADD_DEPEND}")