diff options
author | <philippe colliot> | 2015-12-07 15:09:31 +0100 |
---|---|---|
committer | <philippe colliot> | 2015-12-07 15:09:31 +0100 |
commit | 0a00affdc77ed4fb1865a421b87bc6a61d8b983f (patch) | |
tree | 55ae33f2ec02c9f8de3710e49d2549f4f6137d99 /api | |
parent | ec98b346ff5570c52fdd609c154271e4df93e24a (diff) | |
download | poi-service-0a00affdc77ed4fb1865a421b87bc6a61d8b983f.tar.gz |
add cmake files to generate the common api stuff
Diffstat (limited to 'api')
-rw-r--r-- | api/franca/CMakeLists.txt | 35 | ||||
-rw-r--r-- | api/franca/README | 13 | ||||
-rw-r--r-- | api/franca/hmi/CMakeLists.txt | 27 | ||||
-rw-r--r-- | api/franca/hmi/speechservice/CMakeLists.txt | 64 | ||||
-rw-r--r-- | api/franca/navigation/CMakeLists.txt | 30 | ||||
-rw-r--r-- | api/franca/navigation/freetextsearchservice/CMakeLists.txt | 64 | ||||
-rw-r--r-- | api/franca/navigation/mapviewer/CMakeLists.txt | 64 | ||||
-rw-r--r-- | api/franca/navigation/navigationcore/CMakeLists.txt | 64 | ||||
-rw-r--r-- | api/franca/navigation/poiservice/CMakeLists.txt | 10 | ||||
-rwxr-xr-x | api/generate_all.sh | 20 |
10 files changed, 338 insertions, 53 deletions
diff --git a/api/franca/CMakeLists.txt b/api/franca/CMakeLists.txt index 6efc9ef..95c72fc 100644 --- a/api/franca/CMakeLists.txt +++ b/api/franca/CMakeLists.txt @@ -29,44 +29,19 @@ option(COMMONAPI_TOOL_DIR option(COMMONAPI_DBUS_TOOL_DIR "Absolute path to CommonAPI-DBus tool" "") -execute_process(COMMAND uname -i OUTPUT_VARIABLE OS_VERSION) -if("${OS_VERSION}" MATCHES "i686") - set(OS_VERSION "x86") -endif() -message(STATUS "OS_VERSION = ${OS_VERSION}") - -set(COMMONAPI_FIDL_DIR "${CMAKE_CURRENT_SOURCE_DIR}") -set(COMMONAPI_FIDL_DIR_NAVIGATION "${COMMONAPI_FIDL_DIR}/navigation") -set(COMMONAPI_FIDL_DIR_HMI "${COMMONAPI_FIDL_DIR}/hmi") -set(COMMONAPI_GEN_DIR "${CMAKE_CURRENT_BINARY_DIR}/src-gen") - -find_package(PkgConfig REQUIRED) - -include(FindPkgConfig) - -# generate code from fidl files of navigation -file(GLOB FIDL_FILES -${COMMONAPI_FIDL_DIR}/*.fidl -${COMMONAPI_FIDL_DIR_NAVIGATION}/*.fidl -${COMMONAPI_FIDL_DIR_NAVIGATION}/freetextsearchservice/*.fidl -${COMMONAPI_FIDL_DIR_NAVIGATION}/mapviewer/*.fidl -${COMMONAPI_FIDL_DIR_NAVIGATION}/navigationcore/*.fidl -${COMMONAPI_FIDL_DIR_NAVIGATION}/poiservice/*.fidl -${COMMONAPI_FIDL_DIR_HMI}/*.fidl -${COMMONAPI_FIDL_DIR_HMI}/speechservice/*.fidl -) +set(COMMONAPI_GEN_DIR ${CMAKE_CURRENT_BINARY_DIR}) if (COMMONAPI_TOOL_DIR) - execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} - COMMAND ${COMMONAPI_TOOL_DIR}/org.genivi.commonapi.core.cli.product/target/products/org.genivi.commonapi.core.cli.product/linux/gtk/${OS_VERSION}/commonapi-generator-linux-${OS_VERSION} -sk -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) + message(STATUS "COMMONAPI_TOOL_DIR ${COMMONAPI_TOOL_DIR}") else () message (FATAL_ERROR "Set the variable -DCOMMONAPI_TOOL_DIR=<path>") endif () if (COMMONAPI_DBUS_TOOL_DIR) - execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} - COMMAND ${COMMONAPI_DBUS_TOOL_DIR}/org.genivi.commonapi.dbus.cli.product/target/products/org.genivi.commonapi.dbus.cli.product/linux/gtk/${OS_VERSION}/commonapi-dbus-generator-linux-${OS_VERSION} -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) + message(STATUS "COMMONAPI_DBUS_TOOL_DIR ${COMMONAPI_DBUS_TOOL_DIR}") else () message (FATAL_ERROR "Set the variable -DCOMMONAPI_DBUS_TOOL_DIR=<path>") endif () +add_subdirectory(hmi) +add_subdirectory(navigation) diff --git a/api/franca/README b/api/franca/README index 33bff67..c09d1e4 100644 --- a/api/franca/README +++ b/api/franca/README @@ -7,3 +7,16 @@ Please note that the franca interfaces defined in the fidl files contained in t The conversion of the navigation D-Bus interfaces into franca-IDL interfaces has not been completed yet. The official GENIVI navigation interfaces are those defined in the D-Bus XML files. + +--------------------------------------------------------------------------------------------------------------------------------- +HOW TO GENERATE THE COMMON API FILES +--------------------------------------------------------------------------------------------------------------------------------- +First you need to have generated the common api tools and the common api dbus tools. +For example, to generate the whole set of stubs: + +mkdir build +cd build +cmake -DCOMMONAPI_TOOL_DIR=<tools path> -DCOMMONAPI_DBUS_TOOL_DIR=<dbus tools path> ../ + +To generate part of the stubs, for example the stubs for poi service: +cmake -DCOMMONAPI_TOOL_DIR=<tools path> -DCOMMONAPI_DBUS_TOOL_DIR=<dbus tools path> ../ diff --git a/api/franca/hmi/CMakeLists.txt b/api/franca/hmi/CMakeLists.txt new file mode 100644 index 0000000..5da841e --- /dev/null +++ b/api/franca/hmi/CMakeLists.txt @@ -0,0 +1,27 @@ +########################################################################### +# @licence app begin@ +# SPDX-License-Identifier: MPL-2.0 +# +# Component Name: franca hmi generation +# +# Author: Philippe Colliot +# +# Copyright (C) 2015, PCA Peugeot Citroen +# +# Note: +# The current file is an adaptation of the example file +# http://git.projects.genivi.org/?p=ipc/common-api-tools.git;a=blob;f=CommonAPI-Examples/E01HelloWorld/CMakeLists.txt +# +# License: +# This Source Code Form is subject to the terms of the +# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with +# this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# @licence end@ +########################################################################### + +cmake_minimum_required (VERSION 2.8.1) + +project(franca-hmi) + +add_subdirectory(speechservice) diff --git a/api/franca/hmi/speechservice/CMakeLists.txt b/api/franca/hmi/speechservice/CMakeLists.txt new file mode 100644 index 0000000..94ec064 --- /dev/null +++ b/api/franca/hmi/speechservice/CMakeLists.txt @@ -0,0 +1,64 @@ +########################################################################### +# @licence app begin@ +# SPDX-License-Identifier: MPL-2.0 +# +# Component Name: franca speech output generation +# +# Author: Philippe Colliot +# +# Copyright (C) 2015, PCA Peugeot Citroen +# +# Note: +# The current file is an adaptation of the example file +# http://git.projects.genivi.org/?p=ipc/common-api-tools.git;a=blob;f=CommonAPI-Examples/E01HelloWorld/CMakeLists.txt +# +# License: +# This Source Code Form is subject to the terms of the +# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with +# this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# @licence end@ +########################################################################### + +cmake_minimum_required (VERSION 2.8.1) + +project(franca-speechoutput) + +option(COMMONAPI_TOOL_DIR + "Absolute path to CommonAPI tool" "") +option(COMMONAPI_DBUS_TOOL_DIR + "Absolute path to CommonAPI-DBus tool" "") + +execute_process(COMMAND uname -i OUTPUT_VARIABLE OS_VERSION) +if("${OS_VERSION}" MATCHES "i686") + set(OS_VERSION "x86") +endif() +message(STATUS "OS_VERSION = ${OS_VERSION}") + +set(COMMONAPI_FIDL_DIR "${CMAKE_CURRENT_SOURCE_DIR}") + +find_package(PkgConfig REQUIRED) + +include(FindPkgConfig) + +# generate code from fidl +if(NOT COMMONAPI_GEN_DIR) + message (FATAL_ERROR "Set the variable -DCOMMONAPI_GEN_DIR=<path>") +endif() + +file(GLOB FIDL_FILES "${COMMONAPI_FIDL_DIR}/*.fidl") + +if (COMMONAPI_TOOL_DIR) + execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} + COMMAND ${COMMONAPI_TOOL_DIR}/org.genivi.commonapi.core.cli.product/target/products/org.genivi.commonapi.core.cli.product/linux/gtk/${OS_VERSION}/commonapi-generator-linux-${OS_VERSION} -sk -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) +else () + message (FATAL_ERROR "Set the variable -DCOMMONAPI_TOOL_DIR=<path>") +endif () + +if (COMMONAPI_DBUS_TOOL_DIR) + execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} + COMMAND ${COMMONAPI_DBUS_TOOL_DIR}/org.genivi.commonapi.dbus.cli.product/target/products/org.genivi.commonapi.dbus.cli.product/linux/gtk/${OS_VERSION}/commonapi-dbus-generator-linux-${OS_VERSION} -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) +else () + message (FATAL_ERROR "Set the variable -DCOMMONAPI_DBUS_TOOL_DIR=<path>") +endif () + diff --git a/api/franca/navigation/CMakeLists.txt b/api/franca/navigation/CMakeLists.txt new file mode 100644 index 0000000..44b854e --- /dev/null +++ b/api/franca/navigation/CMakeLists.txt @@ -0,0 +1,30 @@ +########################################################################### +# @licence app begin@ +# SPDX-License-Identifier: MPL-2.0 +# +# Component Name: franca navigation generation +# +# Author: Philippe Colliot +# +# Copyright (C) 2015, PCA Peugeot Citroen +# +# Note: +# The current file is an adaptation of the example file +# http://git.projects.genivi.org/?p=ipc/common-api-tools.git;a=blob;f=CommonAPI-Examples/E01HelloWorld/CMakeLists.txt +# +# License: +# This Source Code Form is subject to the terms of the +# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with +# this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# @licence end@ +########################################################################### + +cmake_minimum_required (VERSION 2.8.1) + +project(franca-navigation) + +add_subdirectory(freetextsearchservice) +add_subdirectory(mapviewer) +add_subdirectory(navigationcore) +add_subdirectory(poiservice) diff --git a/api/franca/navigation/freetextsearchservice/CMakeLists.txt b/api/franca/navigation/freetextsearchservice/CMakeLists.txt new file mode 100644 index 0000000..06c73c7 --- /dev/null +++ b/api/franca/navigation/freetextsearchservice/CMakeLists.txt @@ -0,0 +1,64 @@ +########################################################################### +# @licence app begin@ +# SPDX-License-Identifier: MPL-2.0 +# +# Component Name: franca free text search generation +# +# Author: Philippe Colliot +# +# Copyright (C) 2015, PCA Peugeot Citroen +# +# Note: +# The current file is an adaptation of the example file +# http://git.projects.genivi.org/?p=ipc/common-api-tools.git;a=blob;f=CommonAPI-Examples/E01HelloWorld/CMakeLists.txt +# +# License: +# This Source Code Form is subject to the terms of the +# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with +# this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# @licence end@ +########################################################################### + +cmake_minimum_required (VERSION 2.8.1) + +project(franca-freetextsearch) + +option(COMMONAPI_TOOL_DIR + "Absolute path to CommonAPI tool" "") +option(COMMONAPI_DBUS_TOOL_DIR + "Absolute path to CommonAPI-DBus tool" "") + +execute_process(COMMAND uname -i OUTPUT_VARIABLE OS_VERSION) +if("${OS_VERSION}" MATCHES "i686") + set(OS_VERSION "x86") +endif() +message(STATUS "OS_VERSION = ${OS_VERSION}") + +set(COMMONAPI_FIDL_DIR "${CMAKE_CURRENT_SOURCE_DIR}") + +find_package(PkgConfig REQUIRED) + +include(FindPkgConfig) + +# generate code from fidl +if(NOT COMMONAPI_GEN_DIR) + message (FATAL_ERROR "Set the variable -DCOMMONAPI_GEN_DIR=<path>") +endif() + +file(GLOB FIDL_FILES "${COMMONAPI_FIDL_DIR}/*.fidl") + +if(COMMONAPI_TOOL_DIR) + execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} + COMMAND ${COMMONAPI_TOOL_DIR}/org.genivi.commonapi.core.cli.product/target/products/org.genivi.commonapi.core.cli.product/linux/gtk/${OS_VERSION}/commonapi-generator-linux-${OS_VERSION} -sk -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) +else() + message (FATAL_ERROR "Set the variable -DCOMMONAPI_TOOL_DIR=<path>") +endif() + +if(COMMONAPI_DBUS_TOOL_DIR) + execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} + COMMAND ${COMMONAPI_DBUS_TOOL_DIR}/org.genivi.commonapi.dbus.cli.product/target/products/org.genivi.commonapi.dbus.cli.product/linux/gtk/${OS_VERSION}/commonapi-dbus-generator-linux-${OS_VERSION} -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) +else() + message (FATAL_ERROR "Set the variable -DCOMMONAPI_DBUS_TOOL_DIR=<path>") +endif() + diff --git a/api/franca/navigation/mapviewer/CMakeLists.txt b/api/franca/navigation/mapviewer/CMakeLists.txt new file mode 100644 index 0000000..c8e9247 --- /dev/null +++ b/api/franca/navigation/mapviewer/CMakeLists.txt @@ -0,0 +1,64 @@ +########################################################################### +# @licence app begin@ +# SPDX-License-Identifier: MPL-2.0 +# +# Component Name: franca map viewer generation +# +# Author: Philippe Colliot +# +# Copyright (C) 2015, PCA Peugeot Citroen +# +# Note: +# The current file is an adaptation of the example file +# http://git.projects.genivi.org/?p=ipc/common-api-tools.git;a=blob;f=CommonAPI-Examples/E01HelloWorld/CMakeLists.txt +# +# License: +# This Source Code Form is subject to the terms of the +# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with +# this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# @licence end@ +########################################################################### + +cmake_minimum_required (VERSION 2.8.1) + +project(franca-mapviewer) + +option(COMMONAPI_TOOL_DIR + "Absolute path to CommonAPI tool" "") +option(COMMONAPI_DBUS_TOOL_DIR + "Absolute path to CommonAPI-DBus tool" "") + +execute_process(COMMAND uname -i OUTPUT_VARIABLE OS_VERSION) +if("${OS_VERSION}" MATCHES "i686") + set(OS_VERSION "x86") +endif() +message(STATUS "OS_VERSION = ${OS_VERSION}") + +set(COMMONAPI_FIDL_DIR "${CMAKE_CURRENT_SOURCE_DIR}") + +find_package(PkgConfig REQUIRED) + +include(FindPkgConfig) + +# generate code from fidl +if(NOT COMMONAPI_GEN_DIR) + message (FATAL_ERROR "Set the variable -DCOMMONAPI_GEN_DIR=<path>") +endif() + +file(GLOB FIDL_FILES "${COMMONAPI_FIDL_DIR}/*.fidl") + +if (COMMONAPI_TOOL_DIR) + execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} + COMMAND ${COMMONAPI_TOOL_DIR}/org.genivi.commonapi.core.cli.product/target/products/org.genivi.commonapi.core.cli.product/linux/gtk/${OS_VERSION}/commonapi-generator-linux-${OS_VERSION} -sk -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) +else () + message (FATAL_ERROR "Set the variable -DCOMMONAPI_TOOL_DIR=<path>") +endif () + +if (COMMONAPI_DBUS_TOOL_DIR) + execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} + COMMAND ${COMMONAPI_DBUS_TOOL_DIR}/org.genivi.commonapi.dbus.cli.product/target/products/org.genivi.commonapi.dbus.cli.product/linux/gtk/${OS_VERSION}/commonapi-dbus-generator-linux-${OS_VERSION} -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) +else () + message (FATAL_ERROR "Set the variable -DCOMMONAPI_DBUS_TOOL_DIR=<path>") +endif () + diff --git a/api/franca/navigation/navigationcore/CMakeLists.txt b/api/franca/navigation/navigationcore/CMakeLists.txt new file mode 100644 index 0000000..5e0fc22 --- /dev/null +++ b/api/franca/navigation/navigationcore/CMakeLists.txt @@ -0,0 +1,64 @@ +########################################################################### +# @licence app begin@ +# SPDX-License-Identifier: MPL-2.0 +# +# Component Name: franca navigation core generation +# +# Author: Philippe Colliot +# +# Copyright (C) 2015, PCA Peugeot Citroen +# +# Note: +# The current file is an adaptation of the example file +# http://git.projects.genivi.org/?p=ipc/common-api-tools.git;a=blob;f=CommonAPI-Examples/E01HelloWorld/CMakeLists.txt +# +# License: +# This Source Code Form is subject to the terms of the +# Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with +# this file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# @licence end@ +########################################################################### + +cmake_minimum_required (VERSION 2.8.1) + +project(franca-navigationcore) + +option(COMMONAPI_TOOL_DIR + "Absolute path to CommonAPI tool" "") +option(COMMONAPI_DBUS_TOOL_DIR + "Absolute path to CommonAPI-DBus tool" "") + +execute_process(COMMAND uname -i OUTPUT_VARIABLE OS_VERSION) +if("${OS_VERSION}" MATCHES "i686") + set(OS_VERSION "x86") +endif() +message(STATUS "OS_VERSION = ${OS_VERSION}") + +set(COMMONAPI_FIDL_DIR "${CMAKE_CURRENT_SOURCE_DIR}") + +find_package(PkgConfig REQUIRED) + +include(FindPkgConfig) + +# generate code from fidl +if(NOT COMMONAPI_GEN_DIR) + message (FATAL_ERROR "Set the variable -DCOMMONAPI_GEN_DIR=<path>") +endif() + +file(GLOB FIDL_FILES "${COMMONAPI_FIDL_DIR}/*.fidl") + +if (COMMONAPI_TOOL_DIR) + execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} + COMMAND ${COMMONAPI_TOOL_DIR}/org.genivi.commonapi.core.cli.product/target/products/org.genivi.commonapi.core.cli.product/linux/gtk/${OS_VERSION}/commonapi-generator-linux-${OS_VERSION} -sk -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) +else () + message (FATAL_ERROR "Set the variable -DCOMMONAPI_TOOL_DIR=<path>") +endif () + +if (COMMONAPI_DBUS_TOOL_DIR) + execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} + COMMAND ${COMMONAPI_DBUS_TOOL_DIR}/org.genivi.commonapi.dbus.cli.product/target/products/org.genivi.commonapi.dbus.cli.product/linux/gtk/${OS_VERSION}/commonapi-dbus-generator-linux-${OS_VERSION} -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) +else () + message (FATAL_ERROR "Set the variable -DCOMMONAPI_DBUS_TOOL_DIR=<path>") +endif () + diff --git a/api/franca/navigation/poiservice/CMakeLists.txt b/api/franca/navigation/poiservice/CMakeLists.txt index f057935..758c224 100644 --- a/api/franca/navigation/poiservice/CMakeLists.txt +++ b/api/franca/navigation/poiservice/CMakeLists.txt @@ -2,11 +2,11 @@ # @licence app begin@ # SPDX-License-Identifier: MPL-2.0 # -# Component Name: poi-manager-server +# Component Name: franca navigation poi service generation # -# Author: Marco Residori +# Author: Philippe Colliot # -# Copyright (C) 2015, XS Embedded GmbH +# Copyright (C) 2015, PCA Peugeot Citroen # # Note: # The current file is an adaptation of the example file @@ -42,6 +42,10 @@ find_package(PkgConfig REQUIRED) include(FindPkgConfig) # generate code from fidl +if(NOT COMMONAPI_GEN_DIR) + message (FATAL_ERROR "Set the variable -DCOMMONAPI_GEN_DIR=<path>") +endif() + file(GLOB FIDL_FILES "${COMMONAPI_FIDL_DIR}/*.fidl") if (COMMONAPI_TOOL_DIR) diff --git a/api/generate_all.sh b/api/generate_all.sh deleted file mode 100755 index c1258c2..0000000 --- a/api/generate_all.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -if [ ! $COMMON_API_ROOT_DIR ] -then - echo 'Set the root dir of the common api tools' - echo 'export COMMON_API_ROOT_DIR=<path>' - echo 'COMMON_API_ROOT_DIR/common-api-dbus-tools' - echo 'COMMON_API_ROOT_DIR/common-api-tools' - exit 1 -fi - -echo 'delete the build folder' -rm -rf build - -mkdir build -cd build - -echo 'generate all the templates for CommonAPI' -cmake -DCOMMONAPI_DBUS_TOOL_GENERATOR=$COMMON_API_ROOT_DIR/common-api-dbus-tools/org.genivi.commonapi.dbus.cli.product/target/products/org.genivi.commonapi.dbus.cli.product/linux/gtk/x86/commonapi-dbus-generator-linux-x86 -DCOMMONAPI_TOOL_GENERATOR=$COMMON_API_ROOT_DIR/common-api-tools/org.genivi.commonapi.core.cli.product/target/products/org.genivi.commonapi.core.cli.product/linux/gtk/x86/commonapi-generator-linux-x86 ../franca/ - |