diff options
author | <philippe colliot> | 2015-12-03 17:36:14 +0100 |
---|---|---|
committer | <philippe colliot> | 2015-12-03 17:36:14 +0100 |
commit | ec98b346ff5570c52fdd609c154271e4df93e24a (patch) | |
tree | 3962c3c031c199f35bb796f821b568556fafdc0e /api | |
parent | d0720928ee5e669b6ffc13330a878f132dd2a331 (diff) | |
download | poi-service-ec98b346ff5570c52fdd609c154271e4df93e24a.tar.gz |
Update of poi service with the new fidl
Diffstat (limited to 'api')
-rw-r--r-- | api/franca/CMakeLists.txt | 30 | ||||
-rw-r--r-- | api/franca/navigation/poiservice/CMakeLists.txt | 29 |
2 files changed, 35 insertions, 24 deletions
diff --git a/api/franca/CMakeLists.txt b/api/franca/CMakeLists.txt index 421fa8e..6efc9ef 100644 --- a/api/franca/CMakeLists.txt +++ b/api/franca/CMakeLists.txt @@ -4,9 +4,9 @@ # # Component Name: whole franca 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 @@ -24,10 +24,16 @@ cmake_minimum_required (VERSION 2.8.1) project(whole-franca) -option(COMMONAPI_TOOL_GENERATOR - "Absolute path to CommonAPI code generator" "") -option(COMMONAPI_DBUS_TOOL_GENERATOR - "Absolute path to CommonAPI-DBus code generator" "") +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}") set(COMMONAPI_FIDL_DIR_NAVIGATION "${COMMONAPI_FIDL_DIR}/navigation") @@ -50,17 +56,17 @@ ${COMMONAPI_FIDL_DIR_HMI}/*.fidl ${COMMONAPI_FIDL_DIR_HMI}/speechservice/*.fidl ) -if (COMMONAPI_TOOL_GENERATOR) +if (COMMONAPI_TOOL_DIR) execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} - COMMAND ${COMMONAPI_DBUS_TOOL_GENERATOR} -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) + 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_GENERATOR=<path>") + message (FATAL_ERROR "Set the variable -DCOMMONAPI_TOOL_DIR=<path>") endif () -if (COMMONAPI_DBUS_TOOL_GENERATOR) +if (COMMONAPI_DBUS_TOOL_DIR) execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} - COMMAND ${COMMONAPI_TOOL_GENERATOR} -sk -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) + 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_GENERATOR=<path>") + 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 042441a..f057935 100644 --- a/api/franca/navigation/poiservice/CMakeLists.txt +++ b/api/franca/navigation/poiservice/CMakeLists.txt @@ -22,12 +22,18 @@ cmake_minimum_required (VERSION 2.8.1) -project(poi-manager-server) +project(franca-poiservice) -option(COMMONAPI_TOOL_GENERATOR - "Absolute path to CommonAPI code generator" "") -option(COMMONAPI_DBUS_TOOL_GENERATOR - "Absolute path to CommonAPI-DBus code generator" "") +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}") @@ -37,19 +43,18 @@ include(FindPkgConfig) # generate code from fidl file(GLOB FIDL_FILES "${COMMONAPI_FIDL_DIR}/*.fidl") -message("FIDL_FILES: ${FIDL_FILES}") -if (COMMONAPI_TOOL_GENERATOR) +if (COMMONAPI_TOOL_DIR) execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} - COMMAND ${COMMONAPI_DBUS_TOOL_GENERATOR} -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) + 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_GENERATOR=<path>") + message (FATAL_ERROR "Set the variable -DCOMMONAPI_TOOL_DIR=<path>") endif () -if (COMMONAPI_DBUS_TOOL_GENERATOR) +if (COMMONAPI_DBUS_TOOL_DIR) execute_process(WORKING_DIRECTORY ${COMMONAPI_FIDL_DIR} - COMMAND ${COMMONAPI_TOOL_GENERATOR} -sk -d ${COMMONAPI_GEN_DIR} ${FIDL_FILES}) + 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_GENERATOR=<path>") + message (FATAL_ERROR "Set the variable -DCOMMONAPI_DBUS_TOOL_DIR=<path>") endif () |