1 cmake_minimum_required(VERSION 2.6)
3 PROJECT(PluginCommandInterfaceDbus)
5 #set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xlinker -export-dynamic")
6 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
7 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -pipe -g -Wall -W -D_REENTRANT")
10 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}")
12 set(STD_INCLUDE_DIRS "/usr/include")
13 set(EXECUTABLE_OUTPUT_PATH ../../bin/)
14 set(LIBRARY_OUTPUT_PATH ../plugins/command)
15 set(DOC_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../doc/CommandDBusPlugin)
16 set(AUDIO_INCLUDES_FOLDER ${CMAKE_SOURCE_DIR}/../includes)
17 set(DBUS_INCLUDES_FOLDER ${CMAKE_SOURCE_DIR}/../dbusIncludes)
18 set(INCLUDES_FOLDER ${CMAKE_SOURCE_DIR}/include)
20 find_package (Threads)
21 FIND_PACKAGE(DBUS REQUIRED)
22 FIND_PACKAGE(PkgConfig)
23 pkg_check_modules(DLT REQUIRED automotive-dlt)
26 set(DOCUMENT $ENV{gendoc})
28 file(MAKE_DIRECTORY ${DOC_OUTPUT_PATH})
33 ${CMAKE_CURRENT_BINARY_DIR}
35 ${DBUS_ARCH_INCLUDE_DIR}
36 ${AUDIO_INCLUDES_FOLDER}
38 ${DBUS_INCLUDES_FOLDER}
41 # all source files go here
42 file(GLOB PLUGINDBUS_SRCS_CXX "src/*.cpp")
44 add_library(PluginCommandInterfaceDbus SHARED ${PLUGINDBUS_SRCS_CXX})
46 TARGET_LINK_LIBRARIES(PluginCommandInterfaceDbus
49 ${CMAKE_THREAD_LIBS_INIT}
53 #add a target to generate API documentation with Doxygen
57 configure_file(Doxyfile.in ${PROJECT_BINARY_DIR}/Doxyfile @ONLY IMMEDIATE)
58 add_custom_target (Docs ALL
59 COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${DOC_OUTPUT_PATH}
60 SOURCES ${PROJECT_BINARY_DIR}/Doxyfile)