summaryrefslogtreecommitdiff
path: root/PluginCommandInterfaceCAPI/CMakeLists.txt
diff options
context:
space:
mode:
authorAleksandar Donchev <Aleksander.Donchev@partner.bmw.de>2014-02-12 14:57:34 +0100
committerChristian Linke <christian.linke@bmw.de>2014-03-28 16:48:02 +0100
commit0717ec147195b11fdf23f8326211b97b6ac9b283 (patch)
tree5d50dabaf8086ac17802fc6c8c4872b783065095 /PluginCommandInterfaceCAPI/CMakeLists.txt
parent0360f3d41beb1f66bfbfddf16a9727f4368b75f5 (diff)
downloadaudiomanager-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 'PluginCommandInterfaceCAPI/CMakeLists.txt')
-rw-r--r--PluginCommandInterfaceCAPI/CMakeLists.txt15
1 files changed, 12 insertions, 3 deletions
diff --git a/PluginCommandInterfaceCAPI/CMakeLists.txt b/PluginCommandInterfaceCAPI/CMakeLists.txt
index c30c009..50224d4 100644
--- a/PluginCommandInterfaceCAPI/CMakeLists.txt
+++ b/PluginCommandInterfaceCAPI/CMakeLists.txt
@@ -45,7 +45,16 @@ set(COMMAND_INTERFACE_DBUS_CONF ${COMMAND_INTERFACE_DBUS_CONF} PARENT_SCOPE)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.cmake ${CMAKE_CURRENT_SOURCE_DIR}/include/configCommandCAPI.h )
FIND_PACKAGE(CommonAPI REQUIRED)
-FIND_PACKAGE(CommonAPI_DBus REQUIRED)
+
+# 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_COMMAND_INTERFACE
+ FIDLS fidl/CommandInterface.fidl # 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(
${CMAKE_SOURCE_DIR}
@@ -55,12 +64,12 @@ INCLUDE_DIRECTORIES(
${DLT_INCLUDE_DIRS}
${COMMON_API_INCLUDE_DIRS}
${COMMON_API_DBUS_INCLUDE_DIRS}
- ${COMMON_API_GEN_INCLUDE_DIR}
+ ${COMMON_API_COMMAND_INTERFACE_GEN_INCLUDE_DIR}
${INCLUDE_FOLDER}
)
# all source files go here
-file(GLOB PLUGINCAPI_SRCS_CXX "src/*.cpp" ${COMMON_API_GEN_SOURCES})
+file(GLOB PLUGINCAPI_SRCS_CXX "src/*.cpp" ${COMMON_API_COMMAND_INTERFACE_GEN_SOURCES})
add_library(PluginCommandInterfaceCAPI MODULE ${PLUGINCAPI_SRCS_CXX})