diff options
author | Aleksandar Donchev <Aleksander.Donchev@partner.bmw.de> | 2014-02-12 14:57:34 +0100 |
---|---|---|
committer | Christian Linke <christian.linke@bmw.de> | 2014-03-28 16:48:02 +0100 |
commit | 0717ec147195b11fdf23f8326211b97b6ac9b283 (patch) | |
tree | 5d50dabaf8086ac17802fc6c8c4872b783065095 /AudioManagerDaemon | |
parent | 0360f3d41beb1f66bfbfddf16a9727f4368b75f5 (diff) | |
download | audiomanager-0717ec147195b11fdf23f8326211b97b6ac9b283.tar.gz |
* Support for automatically generation of common-api sources. Cmake macros adopted to support the common-api generator.
Signed-off-by: Christian Linke <christian.linke@bmw.de>
Diffstat (limited to 'AudioManagerDaemon')
-rw-r--r-- | AudioManagerDaemon/CMakeLists.txt | 12 | ||||
-rw-r--r-- | AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CMakeLists.txt | 8 |
2 files changed, 12 insertions, 8 deletions
diff --git a/AudioManagerDaemon/CMakeLists.txt b/AudioManagerDaemon/CMakeLists.txt index 92eea26..2ee16f5 100644 --- a/AudioManagerDaemon/CMakeLists.txt +++ b/AudioManagerDaemon/CMakeLists.txt @@ -46,7 +46,6 @@ FIND_PACKAGE(NSM REQUIRED) IF(WITH_CAPI_WRAPPER) FIND_PACKAGE(CommonAPI REQUIRED) - FIND_PACKAGE(CommonAPI_DBus REQUIRED) ENDIF(WITH_CAPI_WRAPPER) SET(AUDIOMAN_SRCS_CXX @@ -156,6 +155,17 @@ INCLUDE_DIRECTORIES( ) IF(WITH_CAPI_WRAPPER) + +# Find the common-api sources. +# The sources can be placed in the build directory (DESTINATION) or in the source tree (ALT_DESTINATION). +# The ALT_DESTINATION is used as fall back if the DESTINATION directory dosen't contain the sources or you just don't want to use the generator. +INCLUDE(CommonAPIGenerator) +COMMON_API_GENERATE_SOUCRES(TARGET COMMON_API + FIDLS fidls/NodeStateManager.fdepl # a list with fidls + DESTINATION src-gen # a relative path to the build directory or an absolute path + ALT_DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/src-gen # an alternative relative/absolute path with common-api sources, usually in the source tree + DBUS) + INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} ${COMMON_API_INCLUDE_DIRS} ${COMMON_API_DBUS_INCLUDE_DIRS} diff --git a/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CMakeLists.txt b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CMakeLists.txt index 862f3fc..d317b62 100644 --- a/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CMakeLists.txt +++ b/AudioManagerDaemon/test/AmNodeStateCommunicatorCAPITest/CMakeLists.txt @@ -27,14 +27,8 @@ set(EXECUTABLE_OUTPUT_PATH ${TEST_EXECUTABLE_OUTPUT_PATH}) FIND_PACKAGE(Threads) FIND_PACKAGE(PkgConfig) -pkg_check_modules(SQLITE REQUIRED sqlite3) - FIND_PACKAGE(CommonAPI REQUIRED) -FIND_PACKAGE(CommonAPI_DBus REQUIRED) - - -#grab the parent source gen folder, instead of making a copy for the tests -FILE(GLOB_RECURSE COMMON_API_GEN_SOURCES "../../src-gen/*.cpp") +pkg_check_modules(SQLITE REQUIRED sqlite3) IF(WITH_DLT) pkg_check_modules(DLT REQUIRED automotive-dlt>=2.2.0) |