summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author <philippe colliot>2014-10-28 11:28:58 +0100
committer <philippe colliot>2014-10-28 11:28:58 +0100
commit65299d8d86ab948417c24bb469a776c4de7e4270 (patch)
tree758a29d94dcef15bea79e56b64c674e15e5738ab /src
parentdfeb9609b0944109325b554cab2e50a2c7a04079 (diff)
downloadpoi-service-65299d8d86ab948417c24bb469a776c4de7e4270.tar.gz
Clean up cmake files and common location for DBus generated APIs
Diffstat (limited to 'src')
-rw-r--r--src/.gitignore1
-rw-r--r--src/navigation/.gitignore1
-rw-r--r--src/navigation/CMakeLists.txt169
-rw-r--r--src/navigation/README15
-rw-r--r--src/navigation/map-viewer/CMakeLists.txt41
-rw-r--r--src/navigation/map-viewer/configuration-plugin/CMakeLists.txt32
-rw-r--r--src/navigation/map-viewer/configuration-plugin/genivi_mapviewer_configuration.cxx4
-rw-r--r--src/navigation/map-viewer/mapviewercontrol-plugin/CMakeLists.txt55
-rw-r--r--src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx12
-rw-r--r--src/navigation/map-viewer/navit_genivi_mapviewer.xsl6
-rw-r--r--src/navigation/map-viewer/session-plugin/CMakeLists.txt29
-rw-r--r--src/navigation/map-viewer/session-plugin/genivi_mapviewer_session.cxx4
-rw-r--r--src/navigation/map/.gitignore1
-rw-r--r--src/navigation/map/CMakeLists.txt33
-rw-r--r--src/navigation/navigation-core/CMakeLists.txt41
-rw-r--r--src/navigation/navigation-core/configuration-plugin/CMakeLists.txt33
-rw-r--r--src/navigation/navigation-core/configuration-plugin/genivi_navigationcore_configuration.cxx4
-rw-r--r--src/navigation/navigation-core/enhancedposition-plugin/CMakeLists.txt47
-rw-r--r--src/navigation/navigation-core/enhancedposition-plugin/genivi_positioning_enhancedposition.cxx6
-rw-r--r--src/navigation/navigation-core/guidance-plugin/CMakeLists.txt30
-rw-r--r--src/navigation/navigation-core/guidance-plugin/genivi_navigationcore_guidance.cxx4
-rw-r--r--src/navigation/navigation-core/locationinput-plugin/CMakeLists.txt31
-rw-r--r--src/navigation/navigation-core/locationinput-plugin/genivi_navigationcore_locationinput.cxx4
-rw-r--r--src/navigation/navigation-core/mapmatchedposition-plugin/CMakeLists.txt29
-rw-r--r--src/navigation/navigation-core/mapmatchedposition-plugin/genivi_navigationcore_mapmatchedposition.cxx4
-rw-r--r--src/navigation/navigation-core/navit_genivi_navigationcore.xsl14
-rw-r--r--src/navigation/navigation-core/routing-plugin/CMakeLists.txt33
-rw-r--r--src/navigation/navigation-core/routing-plugin/genivi_navigationcore_routing.cxx4
-rw-r--r--src/navigation/navigation-core/session-plugin/CMakeLists.txt29
-rw-r--r--src/navigation/navigation-core/session-plugin/genivi_navigationcore_session.cxx4
-rwxr-xr-xsrc/navigation/patches/0001-add-wayland-ilm-support-navit.patch1052
-rw-r--r--src/navigation/poi-cam/CMakeLists.txt34
-rw-r--r--src/navigation/poi-cam/genivi_poiservice_cam_navit.cxx6
-rw-r--r--src/navigation/script/README27
-rwxr-xr-xsrc/navigation/script/build.sh111
-rw-r--r--src/poi-service/poi-server/CMakeLists.txt43
-rw-r--r--src/poi-service/poi-server/poi-server-class.h18
-rwxr-xr-xsrc/poi-service/script/build.sh38
38 files changed, 1599 insertions, 450 deletions
diff --git a/src/.gitignore b/src/.gitignore
index b4a284c..e69de29 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -1 +0,0 @@
-map
diff --git a/src/navigation/.gitignore b/src/navigation/.gitignore
index 717cb89..0ff198a 100644
--- a/src/navigation/.gitignore
+++ b/src/navigation/.gitignore
@@ -1,2 +1,3 @@
navit
ilm
+Makefile
diff --git a/src/navigation/CMakeLists.txt b/src/navigation/CMakeLists.txt
index 88dd9cb..a7740fd 100644
--- a/src/navigation/CMakeLists.txt
+++ b/src/navigation/CMakeLists.txt
@@ -30,11 +30,15 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
set (git_get_src_version git rev-parse HEAD)
set (git_executable ${GIT})
set (create_file cmake -E touch)
+set (remove_file cmake -E rm)
set (svn_executable ${SVN})
set (svn_get_src_version svnversion)
set(cmake_create_dir cmake -E make_directory)
+set (apply_patch patch -p1 -s)
+
+set(WITH_LM $ENV{WLD})
# Check if ivi layer management stuff with the right version has been cloned and do it if necessary
# ilm is cloned into sub dir
@@ -135,14 +139,13 @@ else()
endif()
endif()
-set (PATCH_EXECUTABLE patch -p1 -s)
if (EXISTS ${weston-ivi-shell_PATCH_DUMMY_FILE})
message(STATUS "patch already applied to weston-ivi-shell")
else()
message(STATUS "apply the patches to weston-ivi-shell")
execute_process(
- COMMAND ${PATCH_EXECUTABLE} -i ${weston-ivi-shell_PATCH_SRC_DIR}/0001-client.pro-Disable-create_cmake-configuration.patch
- COMMAND ${PATCH_EXECUTABLE} -i ${weston-ivi-shell_PATCH_SRC_DIR}/0002-Update-ivi-application.xml-and-fix-inplementation-of.patch
+ COMMAND ${apply_patch} -i ${weston-ivi-shell_PATCH_SRC_DIR}/0001-client.pro-Disable-create_cmake-configuration.patch
+ COMMAND ${apply_patch} -i ${weston-ivi-shell_PATCH_SRC_DIR}/0002-Update-ivi-application.xml-and-fix-inplementation-of.patch
COMMAND ${create_file} ${weston-ivi-shell_PATCH_DUMMY_FILE}
TIMEOUT 0.1 #cmake -E touch never ends so add a timeout here
WORKING_DIRECTORY "${weston-ivi-shell_SRC_DIR}"
@@ -203,6 +206,8 @@ endif()
set(navit_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/navit)
set(navit_URL http://svn.code.sf.net/p/navit/code/trunk)
set(navit_VERSION 5532)
+set(navit_PATCH_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/patches)
+set(navit_PATCH_DUMMY_FILE ${navit_SRC_DIR}/.patched)
if (EXISTS ${navit_SRC_DIR})
execute_process(COMMAND ${svn_get_src_version}
@@ -234,17 +239,29 @@ else()
endif()
endif()
-# Check if the map has been got and do it if necessary (no version checked for the moment)
+if (WITH_LM)
+ if (EXISTS ${navit_PATCH_DUMMY_FILE})
+ message(STATUS "patch already applied to navit")
+ else()
+ message(STATUS "apply the patches to navit")
+ execute_process(
+ COMMAND ${apply_patch} -i ${navit_PATCH_SRC_DIR}/0001-add-wayland-ilm-support-navit.patch
+ COMMAND ${create_file} ${navit_PATCH_DUMMY_FILE}
+ TIMEOUT 0.1 #cmake -E touch never ends so add a timeout here
+ WORKING_DIRECTORY "${navit_SRC_DIR}"
+ RESULT_VARIABLE error_code
+ )
+ if(error_code)
+ message(FATAL_ERROR "Failed to apply the patch")
+ endif()
+ endif()
+endif()
+
+# Check if the map data base have been got and do it if necessary (no version checked for the moment)
set(map_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/map)
set(MAP_FILE switzerland.bin)
-set(MAP_XML_FILE switzerland.xml)
set(map_URL http://www.navit-project.org/${MAP_FILE})
-set(NAVIT_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}/navit)
set(wget wget -O)
-execute_process(
- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
- COMMAND ${cmake_create_dir} map
-)
if (NOT EXISTS ${map_SRC_DIR}/${MAP_FILE})
message(STATUS "get the map")
@@ -258,137 +275,5 @@ if (NOT EXISTS ${map_SRC_DIR}/${MAP_FILE})
endif()
endif()
-if (NOT EXISTS ${NAVIT_BIN_DIR}/navit/maps/${MAP_XML_FILE})
- message(STATUS "generate xml file for the map")
- file(WRITE ${NAVIT_BIN_DIR}/navit/maps/${MAP_XML_FILE} "<map type=\"binfile\" data=\"${map_SRC_DIR}/${MAP_FILE}\" />")
-endif()
-
-# Generate the DBus files used by the plugins before building the code
-set(API_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../api)
-execute_process(
- COMMAND ${cmake_create_dir} navit
-)
-execute_process(
- WORKING_DIRECTORY "${NAVIT_BIN_DIR}"
- COMMAND ${cmake_create_dir} navit
-)
-set(CONSTANTS_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}/constants)
-execute_process(
- COMMAND ${cmake_create_dir} constants
-)
-
-# Do it for navigation-core
-set(NAVIGATION_CORE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/navigation-core)
-set(positioning_API_DIR ${positioning_SRC}/enhanced-position-service/api)
-
-if(NOT EXISTS ${NAVIT_BIN_DIR}/navit/navit_genivi_navigationcore.xml)
- execute_process(
- OUTPUT_FILE ${NAVIT_BIN_DIR}/navit/navit_genivi_navigationcore.xml
- COMMAND ${XSLTPROC} ${NAVIGATION_CORE_SRC}/navit_genivi_navigationcore.xsl ${navit_SRC_DIR}/navit/navit/navit_shipped.xml
- )
-else()
- if(${NAVIGATION_CORE_SRC}/navit_genivi_navigationcore.xsl IS_NEWER_THAN ${NAVIT_BIN_DIR}/navit/navit_genivi_navigationcore.xml)
- execute_process(
- OUTPUT_FILE ${NAVIT_BIN_DIR}/navit/navit_genivi_navigationcore.xml
- COMMAND ${XSLTPROC} ${NAVIGATION_CORE_SRC}/navit_genivi_navigationcore.xsl ${navit_SRC_DIR}/navit/navit/navit_shipped.xml
- )
- endif()
-endif()
-
-file (GLOB XML_TO_DBUS_CONSTANT
- ${API_DIR}/navigation-core/genivi-navigationcore-constants.xml
-)
-foreach (RAW_FILE ${XML_TO_DBUS_CONSTANT})
- get_filename_component(FILE ${RAW_FILE} NAME_WE)
- if(NOT EXISTS ${CONSTANTS_BIN_DIR}/${FILE}.h)
- execute_process(
- OUTPUT_FILE ${CONSTANTS_BIN_DIR}/${FILE}.h
- COMMAND ${XSLTPROC} ${API_DIR}/navigation-core/enum.xsl ${RAW_FILE}
- )
- else()
- if(${RAW_FILE} IS_NEWER_THAN ${CONSTANTS_BIN_DIR}/${FILE}.h)
- execute_process(
- OUTPUT_FILE ${CONSTANTS_BIN_DIR}/${FILE}.h
- COMMAND ${XSLTPROC} ${API_DIR}/navigation-core/enum.xsl ${RAW_FILE}
- )
- endif()
- endif()
-endforeach()
-
-file (GLOB XML_TO_DBUS_CONSTANT_FROM_POSITIONING
- ${positioning_SRC_DIR}/enhanced-position-service/api/genivi-positioning-constants.xml
-)
-foreach (RAW_FILE ${XML_TO_DBUS_CONSTANT_FROM_POSITIONING})
- get_filename_component(FILE ${RAW_FILE} NAME_WE)
- if(NOT EXISTS ${CONSTANTS_BIN_DIR}/${FILE}.h)
- execute_process(
- OUTPUT_FILE ${CONSTANTS_BIN_DIR}/${FILE}.h
- COMMAND ${XSLTPROC} ${API_DIR}/navigation-core/enum.xsl ${RAW_FILE}
- )
- else()
- if(${RAW_FILE} IS_NEWER_THAN ${CONSTANTS_BIN_DIR}/${FILE}.h)
- execute_process(
- OUTPUT_FILE ${CONSTANTS_BIN_DIR}/${FILE}.h
- COMMAND ${XSLTPROC} ${API_DIR}/navigation-core/enum.xsl ${RAW_FILE}
- )
- endif()
- endif()
-endforeach()
-
-# Do it for map-viewer
-set(MAP_VIEWER_SRC ${CMAKE_CURRENT_SOURCE_DIR}/map-viewer)
-
-if(NOT EXISTS ${NAVIT_BIN_DIR}/navit/navit_genivi_mapviewer.xml)
- execute_process(
- OUTPUT_FILE ${NAVIT_BIN_DIR}/navit/navit_genivi_mapviewer.xml
- COMMAND ${XSLTPROC} ${MAP_VIEWER_SRC}/navit_genivi_mapviewer.xsl ${navit_SRC_DIR}/navit/navit/navit_shipped.xml
- )
-else()
- if(${MAP_VIEWER_SRC}/navit_genivi_mapviewer.xsl IS_NEWER_THAN ${NAVIT_BIN_DIR}/navit/navit_genivi_mapviewer.xml)
- execute_process(
- OUTPUT_FILE ${NAVIT_BIN_DIR}/navit/navit_genivi_mapviewer.xml
- COMMAND ${XSLTPROC} ${MAP_VIEWER_SRC}/navit_genivi_mapviewer.xsl ${navit_SRC_DIR}/navit/navit/navit_shipped.xml
- )
- endif()
-endif()
-file (GLOB XML_TO_DBUS_CONSTANT
- ${API_DIR}/map-viewer/genivi-mapviewer-constants.xml
-)
-foreach (RAW_FILE ${XML_TO_DBUS_CONSTANT})
- get_filename_component(FILE ${RAW_FILE} NAME_WE)
- if(NOT EXISTS ${CONSTANTS_BIN_DIR}/${FILE}.h)
- execute_process(
- OUTPUT_FILE ${CONSTANTS_BIN_DIR}/${FILE}.h
- COMMAND ${XSLTPROC} ${API_DIR}/map-viewer/enum.xsl ${RAW_FILE}
- )
- else()
- if(${RAW_FILE} IS_NEWER_THAN ${CONSTANTS_BIN_DIR}/${FILE}.h)
- execute_process(
- OUTPUT_FILE ${CONSTANTS_BIN_DIR}/${FILE}.h
- COMMAND ${XSLTPROC} ${API_DIR}/map-viewer/enum.xsl ${RAW_FILE}
- )
- endif()
- endif()
-endforeach()
-# Do it for poi-service
-file (GLOB XML_TO_DBUS_CONSTANT
- ${API_DIR}/poi-service/genivi-poiservice-constants.xml
-)
-foreach (RAW_FILE ${XML_TO_DBUS_CONSTANT})
- get_filename_component(FILE ${RAW_FILE} NAME_WE)
- if(NOT EXISTS ${CONSTANTS_BIN_DIR}/${FILE}.h)
- execute_process(
- OUTPUT_FILE ${CONSTANTS_BIN_DIR}/${FILE}.h
- COMMAND ${XSLTPROC} ${API_DIR}/poi-service/enum.xsl ${RAW_FILE}
- )
- else()
- if(${RAW_FILE} IS_NEWER_THAN ${CONSTANTS_BIN_DIR}/${FILE}.h)
- execute_process(
- OUTPUT_FILE ${CONSTANTS_BIN_DIR}/${FILE}.h
- COMMAND ${XSLTPROC} ${API_DIR}/poi-service/enum.xsl ${RAW_FILE}
- )
- endif()
- endif()
-endforeach()
diff --git a/src/navigation/README b/src/navigation/README
index ebd00db..11028ff 100644
--- a/src/navigation/README
+++ b/src/navigation/README
@@ -1,4 +1,4 @@
-Release date of the file: 25-07-2014
+Release date of the file: 27-10-2014
Status: OK
Project:
@@ -28,15 +28,12 @@ Ubuntu 14.04 LTS
To get the code:
git clone http://git.projects.genivi.org/lbs/navigation-service.git $WORKING-DIR
-Dependencies:
-(to be completed)
-cmake xsltproc libdbus-c++-dev libdbus-1-dev libdbus-c++-bin
-
-Build:
+Build scripts (cmake based) are located into:
cd $WORKING-DIR/navigation-service/src/navigation/script
-make all2
-To launch (several options available):
-./run
+./build.sh clone
+./build.sh make
+./run
+See the README into the script dir for further explanations
diff --git a/src/navigation/map-viewer/CMakeLists.txt b/src/navigation/map-viewer/CMakeLists.txt
new file mode 100644
index 0000000..f7844db
--- /dev/null
+++ b/src/navigation/map-viewer/CMakeLists.txt
@@ -0,0 +1,41 @@
+###########################################################################
+# @licence app begin@
+# SPDX-License-Identifier: MPL-2.0
+#
+# Component Name: navigation
+#
+# Author: Philippe Colliot
+#
+# Copyright (C) 2014, PCA Peugeot Citroën
+#
+# 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@
+###########################################################################
+project(navigation)
+cmake_minimum_required(VERSION 2.8)
+
+message(STATUS "navigation")
+
+find_program(XSLTPROC xsltproc REQUIRED)
+
+# Generate the config file for navit/mapviewer
+set(MAP_VIEWER_SRC ${CMAKE_CURRENT_SOURCE_DIR})
+
+if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/../navit/navit/navit_genivi_mapviewer.xml)
+ execute_process(
+ OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/../navit/navit/navit_genivi_mapviewer.xml
+ COMMAND ${XSLTPROC} ${MAP_VIEWER_SRC}/navit_genivi_mapviewer.xsl ${navit_SRC_DIR}/navit/navit/navit_shipped.xml
+ )
+else()
+ if(${MAP_VIEWER_SRC}/navit_genivi_mapviewer.xsl IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/../navit/navit/navit_genivi_mapviewer.xml)
+ execute_process(
+ OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/../navit/navit/navit_genivi_mapviewer.xml
+ COMMAND ${XSLTPROC} ${MAP_VIEWER_SRC}/navit_genivi_mapviewer.xsl ${navit_SRC_DIR}/navit/navit/navit_shipped.xml
+ )
+ endif()
+endif()
+
diff --git a/src/navigation/map-viewer/configuration-plugin/CMakeLists.txt b/src/navigation/map-viewer/configuration-plugin/CMakeLists.txt
index c967e5a..8ba14dd 100644
--- a/src/navigation/map-viewer/configuration-plugin/CMakeLists.txt
+++ b/src/navigation/map-viewer/configuration-plugin/CMakeLists.txt
@@ -24,24 +24,28 @@
#
# @licence end@
cmake_minimum_required(VERSION 2.8)
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
+
include(FindPkgConfig)
-include(${navit_SOURCE_DIR}/cmake/navit_macros.cmake)
-include_directories(${INCLUDE_DIRECTORIES})
-include_directories(.)
-include_directories(compat_includes)
-include_directories(${navit_SOURCE_DIR}/..)
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
-link_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat_libs)
+
+include(${navit_SRC_DIR}/navit/cmake/navit_macros.cmake)
+
add_definitions(-DPLUGIN=1)
+
pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
pkg_search_module(GLIB glib-2.0)
include_directories(${GLIB_INCLUDE_DIRS})
-include_directories("${DBUS_CPP_INCLUDE_DIRS}")
include_directories(${DBUS_CPP_INCLUDE_DIRS})
+
+include_directories(${INCLUDE_DIRECTORIES})
+include_directories(.)
+include_directories(${navit_SRC_DIR}/navit)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR}/../..)
+
+include_directories(${generated_api_DIR})
+
set(genivi_mapviewer_configuration_LIBS ${DBUS_CPP_LDFLAGS})
-ADD_CUSTOM_COMMAND(OUTPUT genivi_mapviewer_configuration_adaptor.h
- COMMAND dbusxx-xml2cpp ${mapviewer_API}/genivi-mapviewer-configuration.xml --adaptor=genivi_mapviewer_configuration_adaptor.h
- DEPENDS ${mapviewer_API}/genivi-mapviewer-configuration.xml
- )
-module_add_library(genivi_mapviewer_configuration genivi_mapviewer_configuration.cxx genivi_mapviewer_configuration_adaptor.h)
+
+module_add_library(genivi_mapviewer_configuration genivi_mapviewer_configuration.cxx ${generated_api_DIR}/genivi-mapviewer-configuration_adaptor.h)
diff --git a/src/navigation/map-viewer/configuration-plugin/genivi_mapviewer_configuration.cxx b/src/navigation/map-viewer/configuration-plugin/genivi_mapviewer_configuration.cxx
index a72c5b7..1c9ffc3 100644
--- a/src/navigation/map-viewer/configuration-plugin/genivi_mapviewer_configuration.cxx
+++ b/src/navigation/map-viewer/configuration-plugin/genivi_mapviewer_configuration.cxx
@@ -29,8 +29,8 @@
#include <dbus-c++/glib-integration.h>
#include <locale.h>
#include <stdlib.h>
-#include "constants/genivi-mapviewer-constants.h"
-#include "genivi_mapviewer_configuration_adaptor.h"
+#include "genivi-mapviewer-constants.h"
+#include "genivi-mapviewer-configuration_adaptor.h"
#include "navit/config.h"
#define USE_PLUGINS 1
#include "navit/debug.h"
diff --git a/src/navigation/map-viewer/mapviewercontrol-plugin/CMakeLists.txt b/src/navigation/map-viewer/mapviewercontrol-plugin/CMakeLists.txt
index 0d9acf5..34e3890 100644
--- a/src/navigation/map-viewer/mapviewercontrol-plugin/CMakeLists.txt
+++ b/src/navigation/map-viewer/mapviewercontrol-plugin/CMakeLists.txt
@@ -24,28 +24,36 @@
#
# @licence end@
cmake_minimum_required(VERSION 2.8)
-include(CheckIncludeFiles)
+
include(FindPkgConfig)
-include(${navit_SOURCE_DIR}/cmake/navit_macros.cmake)
-include_directories(${navit_SOURCE_DIR}/..)
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
-include_directories(${INCLUDE_DIRECTORIES})
-include_directories(.)
-include_directories(compat_includes)
-include_directories(${layer_management_INST}/include)
-include_directories(${layer_management_INST}/include/ilm)
-include_directories(${layer_management_INST}/include/layermanager)
-set(CMAKE_REQUIRED_INCLUDES ${layer_management_INST}/include;${layer_management_INST}/include/ilm;${layer_management_INST}/include/layermanager)
-link_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat_libs ${layer_management_INST}/lib)
+include(CheckIncludeFiles)
+
+include(${navit_SRC_DIR}/navit/cmake/navit_macros.cmake)
+
add_definitions(-DPLUGIN=1)
+
pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
pkg_search_module(GLIB glib-2.0)
include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${DBUS_CPP_INCLUDE_DIRS})
+
+include_directories(${INCLUDE_DIRECTORIES})
+include_directories(.)
+include_directories(${navit_SRC_DIR}/navit)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR}/../..)
+
+include_directories(${generated_api_DIR})
+
check_include_files (ilm/ilm_client.h LM)
+
if (LM)
message("building with layer management")
+ include_directories(${layer_management_INST}/include)
+ include_directories(${layer_management_INST}/include/ilm)
+ include_directories(${layer_management_INST}/include/layermanager)
+ set(CMAKE_REQUIRED_INCLUDES ${layer_management_INST}/include;${layer_management_INST}/include/ilm;${layer_management_INST}/include/layermanager)
+ link_directories(${layer_management_INST}/lib)
set(genivi_mapviewer_mapviewercontrol_LIBS ${DBUS_CPP_LDFLAGS} "-lilmCommon" "-lilmClient" "-lilmControl")
add_definitions(-DLM=1)
else()
@@ -53,22 +61,5 @@ else()
set(genivi_mapviewer_mapviewercontrol_LIBS ${DBUS_CPP_LDFLAGS})
add_definitions(-DLM=0)
endif()
-ADD_CUSTOM_COMMAND(OUTPUT genivi_mapviewer_mapviewercontrol_adaptor.h
- COMMAND dbusxx-xml2cpp ${mapviewer_API}/genivi-mapviewer-mapviewercontrol.xml --adaptor=genivi_mapviewer_mapviewercontrol_adaptor.h &&
- sed -i -e "'s/>, >/> >/g'" -e "'s/>, >/> >/g'" -e 's/>::DBus::Struct</>,::DBus::Struct</g' -e 's/>::DBus::Variant/>,::DBus::Variant/g' genivi_mapviewer_mapviewercontrol_adaptor.h
- DEPENDS ${mapviewer_API}/genivi-mapviewer-mapviewercontrol.xml
- )
-ADD_CUSTOM_COMMAND(OUTPUT genivi_navigationcore_routing_proxy.h
- COMMAND dbusxx-xml2cpp ${navigationcore_API}/genivi-navigationcore-routing.xml --proxy=genivi_navigationcore_routing_proxy.h &&
- sed -i -e "'s/>, >/> >/g'" -e 's/>::DBus::Struct</>,::DBus::Struct</g' genivi_navigationcore_routing_proxy.h
- DEPENDS ${navigationcore_API}/genivi-navigationcore-routing.xml
- )
-ADD_CUSTOM_COMMAND(OUTPUT genivi_navigationcore_session_proxy.h
- COMMAND dbusxx-xml2cpp ${navigationcore_API}/genivi-navigationcore-session.xml --proxy=genivi_navigationcore_session_proxy.h
- DEPENDS ${navigationcore_API}/genivi-navigationcore-session.xml
- )
-ADD_CUSTOM_COMMAND(OUTPUT genivi_navigationcore_mapmatchedposition_proxy.h
- COMMAND dbusxx-xml2cpp ${navigationcore_API}/genivi-navigationcore-mapmatchedposition.xml --proxy=genivi_navigationcore_mapmatchedposition_proxy.h
- DEPENDS ${navigationcore_API}/genivi-navigationcore-mapmatchedposition.xml
- )
-module_add_library(genivi_mapviewer_mapviewercontrol genivi_mapviewer_mapviewercontrol.cxx genivi_mapviewer_mapviewercontrol_adaptor.h genivi_navigationcore_routing_proxy.h genivi_navigationcore_session_proxy.h genivi_navigationcore_mapmatchedposition_proxy.h)
+
+module_add_library(genivi_mapviewer_mapviewercontrol genivi_mapviewer_mapviewercontrol.cxx ${generated_api_DIR}/genivi-mapviewer-mapviewercontrol_adaptor.h ${generated_api_DIR}/genivi-navigationcore-routing_proxy.h ${generated_api_DIR}/genivi-navigationcore-session_proxy.h ${generated_api_DIR}/genivi-navigationcore-mapmatchedposition_proxy.h)
diff --git a/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx b/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx
index 5c3a5bf..382f69f 100644
--- a/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx
+++ b/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx
@@ -39,12 +39,12 @@
#define FSA_LAYER 2000
#endif
#endif
-#include "genivi_mapviewer_mapviewercontrol_adaptor.h"
-#include "genivi_navigationcore_routing_proxy.h"
-#include "genivi_navigationcore_session_proxy.h"
-#include "genivi_navigationcore_mapmatchedposition_proxy.h"
-#include "constants/genivi-navigationcore-constants.h"
-#include "constants/genivi-mapviewer-constants.h"
+#include "genivi-mapviewer-mapviewercontrol_adaptor.h"
+#include "genivi-navigationcore-routing_proxy.h"
+#include "genivi-navigationcore-session_proxy.h"
+#include "genivi-navigationcore-mapmatchedposition_proxy.h"
+#include "genivi-navigationcore-constants.h"
+#include "genivi-mapviewer-constants.h"
#include "navit/config.h"
#define USE_PLUGINS 1
#include "navit/debug.h"
diff --git a/src/navigation/map-viewer/navit_genivi_mapviewer.xsl b/src/navigation/map-viewer/navit_genivi_mapviewer.xsl
index 4f55246..86659c0 100644
--- a/src/navigation/map-viewer/navit_genivi_mapviewer.xsl
+++ b/src/navigation/map-viewer/navit_genivi_mapviewer.xsl
@@ -23,11 +23,11 @@
<xsl:template match="/config/plugins/plugin[1]" priority="1" >
<xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
<xsl:text>&#x0A; </xsl:text>
- <plugin path="../../mapviewer-configuration/.libs/libgenivi_mapviewer_configuration.so" ondemand="no"/>
+ <plugin path="../../map-viewer/mapviewer-configuration/.libs/libgenivi_mapviewer_configuration.so" ondemand="no"/>
<xsl:text>&#x0A; </xsl:text>
- <plugin path="../../mapviewer-session/.libs/libgenivi_mapviewer_session.so" ondemand="no"/>
+ <plugin path="../../map-viewer/mapviewer-session/.libs/libgenivi_mapviewer_session.so" ondemand="no"/>
<xsl:text>&#x0A; </xsl:text>
- <plugin path="../../mapviewer-mapviewercontrol/.libs/libgenivi_mapviewer_mapviewercontrol.so" ondemand="no"/>
+ <plugin path="../../map-viewer/mapviewer-mapviewercontrol/.libs/libgenivi_mapviewer_mapviewercontrol.so" ondemand="no"/>
</xsl:template>
<xsl:template match="/config/plugins/plugin">
<xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
diff --git a/src/navigation/map-viewer/session-plugin/CMakeLists.txt b/src/navigation/map-viewer/session-plugin/CMakeLists.txt
index c477d6b..3aa56e9 100644
--- a/src/navigation/map-viewer/session-plugin/CMakeLists.txt
+++ b/src/navigation/map-viewer/session-plugin/CMakeLists.txt
@@ -24,23 +24,26 @@
#
# @licence end@
cmake_minimum_required(VERSION 2.8)
+
include(FindPkgConfig)
-include(${navit_SOURCE_DIR}/cmake/navit_macros.cmake)
-include_directories(${INCLUDE_DIRECTORIES})
-include_directories(.)
-include_directories(compat_includes)
-include_directories(${navit_SOURCE_DIR}/..)
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
-link_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat_libs)
+
+include(${navit_SRC_DIR}/navit/cmake/navit_macros.cmake)
+
add_definitions(-DPLUGIN=1)
+
pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
pkg_search_module(GLIB glib-2.0)
include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${DBUS_CPP_INCLUDE_DIRS})
+
+include_directories(${INCLUDE_DIRECTORIES})
+include_directories(.)
+include_directories(${navit_SRC_DIR}/navit)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR}/../..)
+
+include_directories(${generated_api_DIR})
+
set(genivi_mapviewer_session_LIBS ${DBUS_CPP_LDFLAGS})
-ADD_CUSTOM_COMMAND(OUTPUT genivi_mapviewer_session_adaptor.h
- COMMAND dbusxx-xml2cpp ${mapviewer_API}/genivi-mapviewer-session.xml --adaptor=genivi_mapviewer_session_adaptor.h
- DEPENDS ${mapviewer_API}/genivi-mapviewer-session.xml
- )
-module_add_library(genivi_mapviewer_session genivi_mapviewer_session.cxx genivi_mapviewer_session_adaptor.h)
+
+module_add_library(genivi_mapviewer_session genivi_mapviewer_session.cxx ${generated_api_DIR}/genivi-mapviewer-session_adaptor.h)
diff --git a/src/navigation/map-viewer/session-plugin/genivi_mapviewer_session.cxx b/src/navigation/map-viewer/session-plugin/genivi_mapviewer_session.cxx
index 5399fcc..092768a 100644
--- a/src/navigation/map-viewer/session-plugin/genivi_mapviewer_session.cxx
+++ b/src/navigation/map-viewer/session-plugin/genivi_mapviewer_session.cxx
@@ -26,8 +26,8 @@
* @licence end@
*/
#include <dbus-c++/glib-integration.h>
-#include "constants/genivi-mapviewer-constants.h"
-#include "genivi_mapviewer_session_adaptor.h"
+#include "genivi-mapviewer-constants.h"
+#include "genivi-mapviewer-session_adaptor.h"
#include "navit/config.h"
#define USE_PLUGINS 1
#include "navit/debug.h"
diff --git a/src/navigation/map/.gitignore b/src/navigation/map/.gitignore
new file mode 100644
index 0000000..a8a0dce
--- /dev/null
+++ b/src/navigation/map/.gitignore
@@ -0,0 +1 @@
+*.bin
diff --git a/src/navigation/map/CMakeLists.txt b/src/navigation/map/CMakeLists.txt
new file mode 100644
index 0000000..2401f59
--- /dev/null
+++ b/src/navigation/map/CMakeLists.txt
@@ -0,0 +1,33 @@
+###########################################################################
+# @licence app begin@
+# SPDX-License-Identifier: MPL-2.0
+#
+# Component Name: navigation
+#
+# Author: Philippe Colliot
+#
+# Copyright (C) 2014, PCA Peugeot Citroën
+#
+# 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@
+###########################################################################
+project(navigation)
+cmake_minimum_required(VERSION 2.8)
+
+message(STATUS "maps")
+
+file (GLOB MAP_FILE_LIST
+ ${CMAKE_CURRENT_SOURCE_DIR}/*.bin
+)
+
+foreach (RAW_FILE ${MAP_FILE_LIST})
+ get_filename_component(FILE ${RAW_FILE} NAME_WE)
+ if(NOT EXISTS ${NAVIT_MAPS_DIR}/${FILE}.xml)
+ message(STATUS "generate xml file for the map of '${FILE}'")
+ file(WRITE ${NAVIT_MAPS_DIR}/${FILE}.xml "<map type=\"binfile\" data=\"${RAW_FILE}\" />")
+ endif()
+endforeach()
diff --git a/src/navigation/navigation-core/CMakeLists.txt b/src/navigation/navigation-core/CMakeLists.txt
new file mode 100644
index 0000000..25b713e
--- /dev/null
+++ b/src/navigation/navigation-core/CMakeLists.txt
@@ -0,0 +1,41 @@
+###########################################################################
+# @licence app begin@
+# SPDX-License-Identifier: MPL-2.0
+#
+# Component Name: navigation
+#
+# Author: Philippe Colliot
+#
+# Copyright (C) 2014, PCA Peugeot Citroën
+#
+# 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@
+###########################################################################
+project(navigation)
+cmake_minimum_required(VERSION 2.8)
+
+message(STATUS "navigation")
+
+find_program(XSLTPROC xsltproc REQUIRED)
+
+# Generate the config file for navit/navigation-core
+set(NAVIGATION_CORE_SRC ${CMAKE_CURRENT_SOURCE_DIR})
+
+if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/../navit/navit/navit_genivi_navigationcore.xml)
+ execute_process(
+ OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/../navit/navit/navit_genivi_navigationcore.xml
+ COMMAND ${XSLTPROC} ${NAVIGATION_CORE_SRC}/navit_genivi_navigationcore.xsl ${navit_SRC_DIR}/navit/navit/navit_shipped.xml
+ )
+else()
+ if(${NAVIGATION_CORE_SRC}/navit_genivi_navigationcore.xsl IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/../navit/navit/navit_genivi_navigationcore.xml)
+ execute_process(
+ OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/../navit/navit/navit_genivi_navigationcore.xml
+ COMMAND ${XSLTPROC} ${NAVIGATION_CORE_SRC}/navit_genivi_navigationcore.xsl ${navit_SRC_DIR}/navit/navit/navit_shipped.xml
+ )
+ endif()
+endif()
+
diff --git a/src/navigation/navigation-core/configuration-plugin/CMakeLists.txt b/src/navigation/navigation-core/configuration-plugin/CMakeLists.txt
index fb69f2c..6ce0f25 100644
--- a/src/navigation/navigation-core/configuration-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/configuration-plugin/CMakeLists.txt
@@ -24,23 +24,30 @@
#
# @licence end@
cmake_minimum_required(VERSION 2.8)
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
+
include(FindPkgConfig)
-include(${navit_SOURCE_DIR}/cmake/navit_macros.cmake)
-include_directories(${INCLUDE_DIRECTORIES})
-include_directories(.)
-include_directories(compat_includes)
-include_directories(${navit_SOURCE_DIR}/..)
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
-link_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat_libs)
+
+include(${navit_SRC_DIR}/navit/cmake/navit_macros.cmake)
+
add_definitions(-DPLUGIN=1)
+
pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
pkg_search_module(GLIB glib-2.0)
include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${DBUS_CPP_INCLUDE_DIRS})
+
+include_directories(${INCLUDE_DIRECTORIES})
+include_directories(.)
+include_directories(${navit_SRC_DIR}/navit)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR}/../..)
+
+include_directories(${generated_api_DIR})
+
set(genivi_navigationcore_configuration_LIBS ${DBUS_CPP_LDFLAGS})
-ADD_CUSTOM_COMMAND(OUTPUT genivi_navigationcore_configuration_adaptor.h
- COMMAND dbusxx-xml2cpp ${navigationcore_API}/genivi-navigationcore-configuration.xml --adaptor=genivi_navigationcore_configuration_adaptor.h
- DEPENDS ${navigationcore_API}/genivi-navigationcore-configuration.xml
- )
-module_add_library(genivi_navigationcore_configuration genivi_navigationcore_configuration.cxx genivi_navigationcore_configuration_adaptor.h)
+
+module_add_library(genivi_navigationcore_configuration genivi_navigationcore_configuration.cxx ${generated_api_DIR}/genivi-navigationcore-configuration_adaptor.h)
+
+
diff --git a/src/navigation/navigation-core/configuration-plugin/genivi_navigationcore_configuration.cxx b/src/navigation/navigation-core/configuration-plugin/genivi_navigationcore_configuration.cxx
index 5f5e72b..3e22d00 100644
--- a/src/navigation/navigation-core/configuration-plugin/genivi_navigationcore_configuration.cxx
+++ b/src/navigation/navigation-core/configuration-plugin/genivi_navigationcore_configuration.cxx
@@ -29,8 +29,8 @@
#include <dbus-c++/glib-integration.h>
#include <locale.h>
#include <stdlib.h>
-#include "constants/genivi-navigationcore-constants.h"
-#include "genivi_navigationcore_configuration_adaptor.h"
+#include "genivi-navigationcore-constants.h"
+#include "genivi-navigationcore-configuration_adaptor.h"
#include "navit/config.h"
#define USE_PLUGINS 1
#include "navit/debug.h"
diff --git a/src/navigation/navigation-core/enhancedposition-plugin/CMakeLists.txt b/src/navigation/navigation-core/enhancedposition-plugin/CMakeLists.txt
index 99ae2ca..e0c0f9a 100644
--- a/src/navigation/navigation-core/enhancedposition-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/enhancedposition-plugin/CMakeLists.txt
@@ -24,24 +24,47 @@
#
# @licence end@
cmake_minimum_required(VERSION 2.8)
+
include(FindPkgConfig)
-include(${navit_SOURCE_DIR}/cmake/navit_macros.cmake)
-include_directories(${navit_SOURCE_DIR}/..)
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
-include_directories(${INCLUDE_DIRECTORIES})
-include_directories(.)
-include_directories(compat_includes)
-link_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat_libs)
+
+include(${navit_SRC_DIR}/navit/cmake/navit_macros.cmake)
+
add_definitions(-DPLUGIN=1)
+
pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
pkg_search_module(GLIB glib-2.0)
include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${DBUS_CPP_INCLUDE_DIRS})
+
+include_directories(${INCLUDE_DIRECTORIES})
+include_directories(.)
+include_directories(${navit_SRC_DIR}/navit)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR}/../..)
+
+include_directories(${generated_api_DIR})
+
set(genivi_positioning_enhancedposition_LIBS ${DBUS_CPP_LDFLAGS})
-ADD_CUSTOM_COMMAND(OUTPUT genivi_positioning_enhancedposition_proxy.h
- COMMAND dbusxx-xml2cpp ${positioning_API}/genivi-positioning-enhancedposition.xml --proxy=genivi_positioning_enhancedposition_proxy.h &&
- sed -i -e "'s/>, >/> >/g'" -e 's/>::DBus::Struct</>,::DBus::Struct</g' genivi_positioning_enhancedposition_proxy.h
+
+message(STATUS "${positioning_API}")
+
+ADD_CUSTOM_COMMAND(OUTPUT ${generated_api_DIR}/genivi-positioning-enhancedposition_proxy.h
+ COMMAND dbusxx-xml2cpp ${positioning_API}/genivi-positioning-enhancedposition.xml --proxy=${generated_api_DIR}/genivi-positioning-enhancedposition_proxy.h
DEPENDS ${positioning_API}/genivi-positioning-enhancedposition.xml
)
-module_add_library(genivi_positioning_enhancedposition genivi_positioning_enhancedposition.cxx genivi_positioning_enhancedposition_proxy.h)
+
+if(NOT EXISTS ${generated_api_DIR}/genivi-positioning-constants.h)
+ execute_process(
+ OUTPUT_FILE ${generated_api_DIR}/genivi-positioning-constants.h
+ COMMAND xsltproc ${api_DIR}/poi-service/enum.xsl ${positioning_API}/genivi-positioning-constants.xml
+ )
+else()
+ if(${positioning_API}/genivi-positioning-constants.xml IS_NEWER_THAN ${generated_api_DIR}/genivi-positioning-constants.h)
+ execute_process(
+ OUTPUT_FILE ${generated_api_DIR}/genivi-positioning-constants.h
+ COMMAND xsltproc ${api_DIR}/poi-service/enum.xsl ${positioning_API}/genivi-positioning-constants.xml #use another enum.xsl for radix consistency
+ )
+ endif()
+endif()
+
+module_add_library(genivi_positioning_enhancedposition genivi_positioning_enhancedposition.cxx ${generated_api_DIR}/genivi-positioning-enhancedposition_proxy.h)
diff --git a/src/navigation/navigation-core/enhancedposition-plugin/genivi_positioning_enhancedposition.cxx b/src/navigation/navigation-core/enhancedposition-plugin/genivi_positioning_enhancedposition.cxx
index 4429747..89b2c3a 100644
--- a/src/navigation/navigation-core/enhancedposition-plugin/genivi_positioning_enhancedposition.cxx
+++ b/src/navigation/navigation-core/enhancedposition-plugin/genivi_positioning_enhancedposition.cxx
@@ -48,8 +48,8 @@
*/
#include <dbus-c++/glib-integration.h>
-#include "constants/genivi-navigationcore-constants.h"
-#include "constants/genivi-positioning-constants.h"
+#include "genivi-navigationcore-constants.h"
+#include "genivi-positioning-constants.h"
#include <glib.h>
#include <string.h>
#include <stdbool.h>
@@ -68,7 +68,7 @@
#include "time.h"
-#include "genivi_positioning_enhancedposition_proxy.h"
+#include "genivi-positioning-enhancedposition_proxy.h"
DBus::Glib::BusDispatcher dispatcher;
DBus::Connection *conn;
diff --git a/src/navigation/navigation-core/guidance-plugin/CMakeLists.txt b/src/navigation/navigation-core/guidance-plugin/CMakeLists.txt
index 3469394..802b1fe 100644
--- a/src/navigation/navigation-core/guidance-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/guidance-plugin/CMakeLists.txt
@@ -24,24 +24,26 @@
#
# @licence end@
cmake_minimum_required(VERSION 2.8)
+
include(FindPkgConfig)
-include(${navit_SOURCE_DIR}/cmake/navit_macros.cmake)
-include_directories(${INCLUDE_DIRECTORIES})
-include_directories(.)
-include_directories(compat_includes)
-include_directories(${navit_SOURCE_DIR}/..)
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
-link_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat_libs)
+
+include(${navit_SRC_DIR}/navit/cmake/navit_macros.cmake)
+
add_definitions(-DPLUGIN=1)
+
pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
pkg_search_module(GLIB glib-2.0)
include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${DBUS_CPP_INCLUDE_DIRS})
+
+include_directories(${INCLUDE_DIRECTORIES})
+include_directories(.)
+include_directories(${navit_SRC_DIR}/navit)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR}/../..)
+
+include_directories(${generated_api_DIR})
+
set(genivi_navigationcore_guidance_LIBS ${DBUS_CPP_LDFLAGS})
-ADD_CUSTOM_COMMAND(OUTPUT genivi_navigationcore_guidance_adaptor.h
- COMMAND dbusxx-xml2cpp ${navigationcore_API}/genivi-navigationcore-guidance.xml --adaptor=genivi_navigationcore_guidance_adaptor.h &&
- sed -i -e "'s/>, >/> >/g'" -e "'s/>, >/> >/g'" -e 's/>::DBus::Struct</>,::DBus::Struct</g' genivi_navigationcore_guidance_adaptor.h
- DEPENDS ${navigationcore_API}/genivi-navigationcore-guidance.xml
- )
-module_add_library(genivi_navigationcore_guidance genivi_navigationcore_guidance.cxx genivi_navigationcore_guidance_adaptor.h)
+
+module_add_library(genivi_navigationcore_guidance genivi_navigationcore_guidance.cxx ${generated_api_DIR}/genivi-navigationcore-guidance_adaptor.h)
diff --git a/src/navigation/navigation-core/guidance-plugin/genivi_navigationcore_guidance.cxx b/src/navigation/navigation-core/guidance-plugin/genivi_navigationcore_guidance.cxx
index 1a92dfe..52dc82d 100644
--- a/src/navigation/navigation-core/guidance-plugin/genivi_navigationcore_guidance.cxx
+++ b/src/navigation/navigation-core/guidance-plugin/genivi_navigationcore_guidance.cxx
@@ -27,8 +27,8 @@
* @licence end@
*/
#include <dbus-c++/glib-integration.h>
-#include "constants/genivi-navigationcore-constants.h"
-#include "genivi_navigationcore_guidance_adaptor.h"
+#include "genivi-navigationcore-constants.h"
+#include "genivi-navigationcore-guidance_adaptor.h"
#include "navit/config.h"
#define USE_PLUGINS 1
#include "navit/debug.h"
diff --git a/src/navigation/navigation-core/locationinput-plugin/CMakeLists.txt b/src/navigation/navigation-core/locationinput-plugin/CMakeLists.txt
index 23d8430..44a72a0 100644
--- a/src/navigation/navigation-core/locationinput-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/locationinput-plugin/CMakeLists.txt
@@ -24,24 +24,27 @@
#
# @licence end@
cmake_minimum_required(VERSION 2.8)
+
include(FindPkgConfig)
-include(${navit_SOURCE_DIR}/cmake/navit_macros.cmake)
-include_directories(${INCLUDE_DIRECTORIES})
-include_directories(.)
-include_directories(../../..)
-include_directories(compat_includes)
-include_directories(${navit_SOURCE_DIR}/..)
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
-link_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat_libs)
+
+include(${navit_SRC_DIR}/navit/cmake/navit_macros.cmake)
+
add_definitions(-DPLUGIN=1)
+
pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
pkg_search_module(GLIB glib-2.0)
include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${DBUS_CPP_INCLUDE_DIRS})
+
+include_directories(${INCLUDE_DIRECTORIES})
+include_directories(.)
+include_directories(${navit_SRC_DIR}/navit)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR}/../..)
+
+include_directories(${generated_api_DIR})
+
set(genivi_navigationcore_locationinput_LIBS ${DBUS_CPP_LDFLAGS})
-ADD_CUSTOM_COMMAND(OUTPUT genivi_navigationcore_locationinput_adaptor.h
- COMMAND dbusxx-xml2cpp ${navigationcore_API}/genivi-navigationcore-locationinput.xml --adaptor=genivi_navigationcore_locationinput_adaptor.h
- DEPENDS ${navigationcore_API}/genivi-navigationcore-locationinput.xml
- )
-module_add_library(genivi_navigationcore_locationinput genivi_navigationcore_locationinput.cxx genivi_navigationcore_locationinput_adaptor.h)
+
+module_add_library(genivi_navigationcore_locationinput genivi_navigationcore_locationinput.cxx ${generated_api_DIR}/genivi-navigationcore-locationinput_adaptor.h)
+
diff --git a/src/navigation/navigation-core/locationinput-plugin/genivi_navigationcore_locationinput.cxx b/src/navigation/navigation-core/locationinput-plugin/genivi_navigationcore_locationinput.cxx
index 2eb1a41..8c6ce68 100644
--- a/src/navigation/navigation-core/locationinput-plugin/genivi_navigationcore_locationinput.cxx
+++ b/src/navigation/navigation-core/locationinput-plugin/genivi_navigationcore_locationinput.cxx
@@ -26,8 +26,8 @@
* @licence end@
*/
#include <dbus-c++/glib-integration.h>
-#include "constants/genivi-navigationcore-constants.h"
-#include "genivi_navigationcore_locationinput_adaptor.h"
+#include "genivi-navigationcore-constants.h"
+#include "genivi-navigationcore-locationinput_adaptor.h"
#include "navit/config.h"
#define USE_PLUGINS 1
#include "navit/debug.h"
diff --git a/src/navigation/navigation-core/mapmatchedposition-plugin/CMakeLists.txt b/src/navigation/navigation-core/mapmatchedposition-plugin/CMakeLists.txt
index 513a95a..49a6fb3 100644
--- a/src/navigation/navigation-core/mapmatchedposition-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/mapmatchedposition-plugin/CMakeLists.txt
@@ -24,23 +24,26 @@
#
# @licence end@
cmake_minimum_required(VERSION 2.8)
+
include(FindPkgConfig)
-include(${navit_SOURCE_DIR}/cmake/navit_macros.cmake)
-include_directories(${INCLUDE_DIRECTORIES})
-include_directories(.)
-include_directories(compat_includes)
-include_directories(${navit_SOURCE_DIR}/..)
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
-link_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat_libs)
+
+include(${navit_SRC_DIR}/navit/cmake/navit_macros.cmake)
+
add_definitions(-DPLUGIN=1)
+
pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
pkg_search_module(GLIB glib-2.0)
include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${DBUS_CPP_INCLUDE_DIRS})
+
+include_directories(${INCLUDE_DIRECTORIES})
+include_directories(.)
+include_directories(${navit_SRC_DIR}/navit)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR}/../..)
+
+include_directories(${generated_api_DIR})
+
set(genivi_navigationcore_mapmatchedposition_LIBS ${DBUS_CPP_LDFLAGS})
-ADD_CUSTOM_COMMAND(OUTPUT genivi_navigationcore_mapmatchedposition_adaptor.h
- COMMAND dbusxx-xml2cpp ${navigationcore_API}/genivi-navigationcore-mapmatchedposition.xml --adaptor=genivi_navigationcore_mapmatchedposition_adaptor.h
- DEPENDS ${navigationcore_API}/genivi-navigationcore-mapmatchedposition.xml
- )
-module_add_library(genivi_navigationcore_mapmatchedposition genivi_navigationcore_mapmatchedposition.cxx genivi_navigationcore_mapmatchedposition_adaptor.h genivi_navigationcore_mapmatchedposition_adaptor.h)
+
+module_add_library(genivi_navigationcore_mapmatchedposition genivi_navigationcore_mapmatchedposition.cxx ${generated_api_DIR}/genivi-navigationcore-mapmatchedposition_adaptor.h)
diff --git a/src/navigation/navigation-core/mapmatchedposition-plugin/genivi_navigationcore_mapmatchedposition.cxx b/src/navigation/navigation-core/mapmatchedposition-plugin/genivi_navigationcore_mapmatchedposition.cxx
index 37032c8..78040b7 100644
--- a/src/navigation/navigation-core/mapmatchedposition-plugin/genivi_navigationcore_mapmatchedposition.cxx
+++ b/src/navigation/navigation-core/mapmatchedposition-plugin/genivi_navigationcore_mapmatchedposition.cxx
@@ -26,8 +26,8 @@
* @licence end@
*/
#include <dbus-c++/glib-integration.h>
-#include "constants/genivi-navigationcore-constants.h"
-#include "genivi_navigationcore_mapmatchedposition_adaptor.h"
+#include "genivi-navigationcore-constants.h"
+#include "genivi-navigationcore-mapmatchedposition_adaptor.h"
#include "navit/config.h"
#define USE_PLUGINS 1
#include "navit/debug.h"
diff --git a/src/navigation/navigation-core/navit_genivi_navigationcore.xsl b/src/navigation/navigation-core/navit_genivi_navigationcore.xsl
index c3a188a..ad475bc 100644
--- a/src/navigation/navigation-core/navit_genivi_navigationcore.xsl
+++ b/src/navigation/navigation-core/navit_genivi_navigationcore.xsl
@@ -23,19 +23,19 @@
<xsl:template match="/config/plugins/plugin[1]" priority="1" >
<xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
<xsl:text>&#x0A; </xsl:text>
- <plugin path="../../navigationcore-configuration/.libs/libgenivi_navigationcore_configuration.so" ondemand="no"/>
+ <plugin path="../../navigation-core/navigationcore-configuration/.libs/libgenivi_navigationcore_configuration.so" ondemand="no"/>
<xsl:text>&#x0A; </xsl:text>
- <plugin path="../../navigationcore-locationinput/.libs/libgenivi_navigationcore_locationinput.so" ondemand="no"/>
+ <plugin path="../../navigation-core/navigationcore-locationinput/.libs/libgenivi_navigationcore_locationinput.so" ondemand="no"/>
<xsl:text>&#x0A; </xsl:text>
- <plugin path="../../navigationcore-routing/.libs/libgenivi_navigationcore_routing.so" ondemand="no"/>
+ <plugin path="../../navigation-core/navigationcore-routing/.libs/libgenivi_navigationcore_routing.so" ondemand="no"/>
<xsl:text>&#x0A; </xsl:text>
- <plugin path="../../navigationcore-session/.libs/libgenivi_navigationcore_session.so" ondemand="no"/>
+ <plugin path="../../navigation-core/navigationcore-session/.libs/libgenivi_navigationcore_session.so" ondemand="no"/>
<xsl:text>&#x0A; </xsl:text>
- <plugin path="../../navigationcore-guidance/.libs/libgenivi_navigationcore_guidance.so" ondemand="no"/>
+ <plugin path="../../navigation-core/navigationcore-guidance/.libs/libgenivi_navigationcore_guidance.so" ondemand="no"/>
<xsl:text>&#x0A; </xsl:text>
- <plugin path="../../navigationcore-mapmatchedposition/.libs/libgenivi_navigationcore_mapmatchedposition.so" ondemand="no"/>
+ <plugin path="../../navigation-core/navigationcore-mapmatchedposition/.libs/libgenivi_navigationcore_mapmatchedposition.so" ondemand="no"/>
<xsl:text>&#x0A; </xsl:text>
- <plugin path="../../navigationcore-enhancedposition/.libs/libgenivi_positioning_enhancedposition.so" ondemand="no"/>
+ <plugin path="../../navigation-core/navigationcore-enhancedposition/.libs/libgenivi_positioning_enhancedposition.so" ondemand="no"/>
<xsl:text>&#x0A; </xsl:text>
<plugin path="../../poi-cam/.libs/libgenivi_poiservice_cam_navit.so" ondemand="no"/>
</xsl:template>
diff --git a/src/navigation/navigation-core/routing-plugin/CMakeLists.txt b/src/navigation/navigation-core/routing-plugin/CMakeLists.txt
index 38b6762..d7c15e3 100644
--- a/src/navigation/navigation-core/routing-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/routing-plugin/CMakeLists.txt
@@ -24,25 +24,26 @@
#
# @licence end@
cmake_minimum_required(VERSION 2.8)
+
include(FindPkgConfig)
-include(${navit_SOURCE_DIR}/cmake/navit_macros.cmake)
-include_directories(${INCLUDE_DIRECTORIES})
-include_directories(.)
-include_directories(../../..)
-include_directories(compat_includes)
-include_directories(${navit_SOURCE_DIR}/..)
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
-link_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat_libs)
-add_definitions(-DPLUGIN=1 -g)
+
+include(${navit_SRC_DIR}/navit/cmake/navit_macros.cmake)
+
+add_definitions(-DPLUGIN=1)
+
pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
pkg_search_module(GLIB glib-2.0)
include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${DBUS_CPP_INCLUDE_DIRS})
+
+include_directories(${INCLUDE_DIRECTORIES})
+include_directories(.)
+include_directories(${navit_SRC_DIR}/navit)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR}/../..)
+
+include_directories(${generated_api_DIR})
+
set(genivi_navigationcore_routing_LIBS ${DBUS_CPP_LDFLAGS})
-ADD_CUSTOM_COMMAND(OUTPUT genivi_navigationcore_routing_adaptor.h
- COMMAND dbusxx-xml2cpp ${navigationcore_API}/genivi-navigationcore-routing.xml --adaptor=genivi_navigationcore_routing_adaptor.h &&
- sed -i -e "'s/>, >/> >/g'" -e 's/>::DBus::Struct</>,::DBus::Struct</g' genivi_navigationcore_routing_adaptor.h
- DEPENDS ${navigationcore_API}/genivi-navigationcore-routing.xml
- )
-module_add_library(genivi_navigationcore_routing genivi_navigationcore_routing.cxx genivi_navigationcore_routing_adaptor.h)
+
+module_add_library(genivi_navigationcore_routing genivi_navigationcore_routing.cxx ${generated_api_DIR}/genivi-navigationcore-routing_adaptor.h)
diff --git a/src/navigation/navigation-core/routing-plugin/genivi_navigationcore_routing.cxx b/src/navigation/navigation-core/routing-plugin/genivi_navigationcore_routing.cxx
index b5ad6ef..f674966 100644
--- a/src/navigation/navigation-core/routing-plugin/genivi_navigationcore_routing.cxx
+++ b/src/navigation/navigation-core/routing-plugin/genivi_navigationcore_routing.cxx
@@ -27,8 +27,8 @@
* @licence end@
*/
#include <dbus-c++/glib-integration.h>
-#include "constants/genivi-navigationcore-constants.h"
-#include "genivi_navigationcore_routing_adaptor.h"
+#include "genivi-navigationcore-constants.h"
+#include "genivi-navigationcore-routing_adaptor.h"
#include "navit/config.h"
#define USE_PLUGINS 1
#include "navit/debug.h"
diff --git a/src/navigation/navigation-core/session-plugin/CMakeLists.txt b/src/navigation/navigation-core/session-plugin/CMakeLists.txt
index e7ba6e0..3d9462c 100644
--- a/src/navigation/navigation-core/session-plugin/CMakeLists.txt
+++ b/src/navigation/navigation-core/session-plugin/CMakeLists.txt
@@ -24,23 +24,26 @@
#
# @licence end@
cmake_minimum_required(VERSION 2.8)
+
include(FindPkgConfig)
-include(${navit_SOURCE_DIR}/cmake/navit_macros.cmake)
-include_directories(${INCLUDE_DIRECTORIES})
-include_directories(.)
-include_directories(compat_includes)
-include_directories(${navit_SOURCE_DIR}/..)
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
-include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
-link_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat_libs)
+
+include(${navit_SRC_DIR}/navit/cmake/navit_macros.cmake)
+
add_definitions(-DPLUGIN=1)
+
pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
pkg_search_module(GLIB glib-2.0)
include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${DBUS_CPP_INCLUDE_DIRS})
+
+include_directories(${INCLUDE_DIRECTORIES})
+include_directories(.)
+include_directories(${navit_SRC_DIR}/navit)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR}/../..)
+
+include_directories(${generated_api_DIR})
+
set(genivi_navigationcore_session_LIBS ${DBUS_CPP_LDFLAGS})
-ADD_CUSTOM_COMMAND(OUTPUT genivi_navigationcore_session_adaptor.h
- COMMAND dbusxx-xml2cpp ${navigationcore_API}/genivi-navigationcore-session.xml --adaptor=genivi_navigationcore_session_adaptor.h
- DEPENDS ${navigationcore_API}/genivi-navigationcore-session.xml
- )
-module_add_library(genivi_navigationcore_session genivi_navigationcore_session.cxx genivi_navigationcore_session_adaptor.h)
+
+module_add_library(genivi_navigationcore_session genivi_navigationcore_session.cxx ${generated_api_DIR}/genivi-navigationcore-session_adaptor.h)
diff --git a/src/navigation/navigation-core/session-plugin/genivi_navigationcore_session.cxx b/src/navigation/navigation-core/session-plugin/genivi_navigationcore_session.cxx
index c2ddff1..b1dd159 100644
--- a/src/navigation/navigation-core/session-plugin/genivi_navigationcore_session.cxx
+++ b/src/navigation/navigation-core/session-plugin/genivi_navigationcore_session.cxx
@@ -26,8 +26,8 @@
* @licence end@
*/
#include <dbus-c++/glib-integration.h>
-#include "constants/genivi-navigationcore-constants.h"
-#include "genivi_navigationcore_session_adaptor.h"
+#include "genivi-navigationcore-constants.h"
+#include "genivi-navigationcore-session_adaptor.h"
#include "navit/config.h"
#define USE_PLUGINS 1
#include "navit/debug.h"
diff --git a/src/navigation/patches/0001-add-wayland-ilm-support-navit.patch b/src/navigation/patches/0001-add-wayland-ilm-support-navit.patch
new file mode 100755
index 0000000..bac36a9
--- /dev/null
+++ b/src/navigation/patches/0001-add-wayland-ilm-support-navit.patch
@@ -0,0 +1,1052 @@
+From
+From: Nobuhiko <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
+Date:
+Subject: [PATCH]
+
+Signed-off-by: Nobuhiko <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
+---
+diff -urN navit/cmake/FindOpenGL.cmake navit/cmake/FindOpenGL.cmake
+--- navit/cmake/FindOpenGL.cmake 1970-01-01 01:00:00.000000000 +0100
++++ navit/cmake/FindOpenGL.cmake 2014-09-23 12:53:02.000000000 +0200
+@@ -0,0 +1,124 @@
++include(LibFindMacros)
++
++libfind_pkg_check_modules(OPENGL_PKGCONFIG gl)
++libfind_pkg_check_modules(OPENGL_GLU_PKGCONFIG glu)
++libfind_pkg_check_modules(OPENGL_GLUT_PKGCONFIG glut)
++libfind_pkg_check_modules(OPENGLES_EGL_PKGCONFIG egl)
++libfind_pkg_check_modules(OPENGLES_PKGCONFIG glesv1_cm)
++libfind_pkg_check_modules(OPENGLES2_PKGCONFIG glesv2)
++
++################
++# Includes dirs
++################
++FIND_PATH(OPENGL_INCLUDE_DIR GL/gl.h
++ PATHS
++ ${OPENGL_PKGCONFIG_INCLUDE_DIRS}
++ ${WLD}/usrfs/include
++)
++
++FIND_PATH(OPENGL_GLU_INCLUDE_DIR GL/glu.h
++ PATHS
++ ${OPENGL_GLU_PKGCONFIG_INCLUDE_DIRS}
++ ${WLD}/usrfs/include
++ /usr/include
++)
++
++FIND_PATH(OPENGL_GLUT_INCLUDE_DIR GL/glut.h
++ PATHS
++ ${OPENGL_GLUT_PKGCONFIG_INCLUDE_DIRS}
++ ${WLD}/usrfs/include
++ /usr/include
++)
++
++FIND_PATH(OPENGLES_EGL_INCLUDE_DIR EGL/egl.h
++ PATHS
++ ${OPENGLES_EGL_PKGCONFIG_INCLUDE_DIRS}
++ ${WLD}/usrfs/include
++)
++
++FIND_PATH(OPENGLES_INCLUDE_DIR GLES/gl.h
++ PATHS
++ ${OPENGLES_PKGCONFIG_INCLUDE_DIRS}
++ ${WLD}/usrfs/include
++)
++
++FIND_PATH(OPENGLES2_INCLUDE_DIR GLES2/gl2.h
++ PATHS
++ ${OPENGLES2_PKGCONFIG_INCLUDE_DIRS}
++ ${WLD}/usrfs/include
++)
++
++#################
++# Libraries dirs
++#################
++FIND_LIBRARY(OPENGL_gl_LIBRARY GL
++ PATHS
++ ${OPENGL_PKGCONFIG_LIBRARY_DIRS}
++ ${WLD}/usrfs/lib
++)
++
++FIND_LIBRARY(OPENGL_glu_LIBRARY GLU
++ PATHS
++ ${OPENGL_GLU_PKGCONFIG_LIBRARY_DIRS}
++ /usr/lib
++)
++
++FIND_LIBRARY(GLUT_glut_LIBRARY glut
++ PATHS
++ ${OPENGL_GLUT_PKGCONFIG_LIBRARY_DIRS}
++ /usr/lib
++)
++
++FIND_LIBRARY(OPENGLES_EGL_LIBRARY EGL
++ PATHS
++ ${OPENGLES_EGL_PKGCONFIG_LIBRARY_DIRS}
++ ${WLD}/usrfs/lib
++)
++
++FIND_LIBRARY(OPENGLES_glesv1_CM_LIBRARY GLESv1_CM
++ PATHS
++ ${OPENGLES_PKGCONFIG_LIBRARY_DIRS}
++ ${WLD}/usrfs/lib
++)
++
++FIND_LIBRARY(OPENGLES2_glesv2_LIBRARY GLESv2
++ PATHS
++ ${OPENGLES2_PKGCONFIG_LIBRARY_DIRS}
++ ${WLD}/usrfs/lib
++)
++
++IF (OPENGL_gl_LIBRARY)
++ SET(OPENGL_FOUND TRUE)
++ENDIF (OPENGL_gl_LIBRARY)
++
++IF (OPENGL_glu_LIBRARY)
++ SET(OPENGL_GLU_FOUND TRUE)
++ENDIF (OPENGL_glu_LIBRARY)
++
++IF (OPENGL_glut_LIBRARY)
++ SET(GLUT_FOUND TRUE)
++ENDIF (OPENGL_glut_LIBRARY)
++
++IF (OPENGLES_EGL_LIBRARY)
++ IF (OPENGLES_glesv1_CM_LIBRARY)
++ SET(USE_OPENGLES TRUE)
++ ENDIF (OPENGLES_glesv1_CM_LIBRARY)
++
++ IF (OPENGLES2_glesv2_LIBRARY)
++ SET(USE_OPENGLES2 TRUE)
++ ENDIF (OPENGLES2_glesv2_LIBRARY)
++ENDIF (OPENGLES_EGL_LIBRARY)
++
++# Result
++MESSAGE(STATUS "OPENGL_INCLUDE_DIR : ${OPENGL_INCLUDE_DIR}")
++MESSAGE(STATUS "OPENGL_gl_LIBRARY : ${OPENGL_gl_LIBRARY}")
++MESSAGE(STATUS "OPENGL_GLU_INCLUDE_DIR : ${OPENGL_GLU_INCLUDE_DIR}")
++MESSAGE(STATUS "OPENGL_glu_LIBRARY : ${OPENGL_glu_LIBRARY}")
++MESSAGE(STATUS "OPENGL_GLUT_INCLUDE_DIR : ${OPENGL_GLUT_INCLUDE_DIR}")
++MESSAGE(STATUS "GLUT_glut_LIBRARY : ${GLUT_glut_LIBRARY}")
++MESSAGE(STATUS "OPENGLES_EGL_INCLUDE_DIR : ${OPENGLES_EGL_INCLUDE_DIR}")
++MESSAGE(STATUS "OPENGLES_EGL_LIBRARY : ${OPENGLES_EGL_LIBRARY}")
++MESSAGE(STATUS "OPENGLES_INCLUDE_DIR : ${OPENGLES_INCLUDE_DIR}")
++MESSAGE(STATUS "OPENGLES_glesv1_CM_LIBRARY: ${OPENGLES_glesv1_CM_LIBRARY}")
++MESSAGE(STATUS "OPENGLES2_INCLUDE_DIR : ${OPENGLES2_INCLUDE_DIR}")
++MESSAGE(STATUS "OPENGLES2_glesv2_LIBRARY : ${OPENGLES2_glesv2_LIBRARY}")
+diff -urN navit/cmake/FindWayland.cmake navit/cmake/FindWayland.cmake
+--- navit/cmake/FindWayland.cmake 1970-01-01 01:00:00.000000000 +0100
++++ navit/cmake/FindWayland.cmake 2014-09-23 12:53:02.000000000 +0200
+@@ -0,0 +1,152 @@
++include(LibFindMacros)
++message(STATUS "FindWayland.cmake: Start")
++
++if (USE_WAYLAND AND WAYLAND_LIBRARIES AND WAYLAND_INCLUDE_DIRS)
++ message(STATUS " [WAYLAND_LIBRARIES] Found: ${WAYLAND_LIBRARIES}")
++ message(STATUS " [WAYLAND_INCLUDE_DIRS] Found: ${WAYLAND_INCLUDE_DIRS}")
++else (USE_WAYLAND AND WAYLAND_LIBRARIES AND WAYLAND_INCLUDE_DIRS)
++
++ libfind_pkg_check_modules(WAYLAND_WLCLIENT_PKGCONFIG wayland-client)
++ libfind_pkg_check_modules(WAYLAND_WLEGL_PKGCONFIG wayland-egl)
++ libfind_pkg_check_modules(WAYLAND_CURSOR_PKGCONFIG wayland-cursor)
++
++ #################################################################
++ #
++ # Finding Include
++ #
++ #################################################################
++
++ if (NOT WAYLAND_WLCLIENT_INCLUDE_DIR)
++ find_path(WAYLAND_WLCLIENT_INCLUDE_DIR
++ NAMES
++ wayland-client.h
++ PATHS
++ ${WAYLAND_WLCLIENT_PKGCONFIG_INCLUDE_DIRS}
++ ${WLD}/usrfs/include
++ )
++ endif (NOT WAYLAND_WLCLIENT_INCLUDE_DIR)
++
++ if (NOT WAYLAND_WLEGL_INCLUDE_DIR)
++ find_path(WAYLAND_WLEGL_INCLUDE_DIR
++ NAMES
++ wayland-egl.h
++ PATHS
++ ${WAYLAND_WLEGL_PKGCONFIG_INCLUDE_DIRS}
++ ${WLD}/usrfs/include
++ )
++ endif (NOT WAYLAND_WLEGL_INCLUDE_DIR)
++
++ ################################################################
++ #
++ # Finding Result of Include
++ #
++ ################################################################
++
++ if (WAYLAND_WLCLIENT_INCLUDE_DIR)
++ message(STATUS " [WAYLAND_WLCLIENT_INCLUDE_DIR] Found: ${WAYLAND_WLCLIENT_INCLUDE_DIR}")
++ else (WAYLAND_WLCLIENT_INCLUDE_DIR)
++ message(STATUS " [WAYLAND_WLCLIENT_INCLUDE_DIR] Could not find")
++ endif (WAYLAND_WLCLIENT_INCLUDE_DIR)
++
++ if (WAYLAND_WLEGL_INCLUDE_DIR)
++ message(STATUS " [WAYLAND_WLEGL_INCLUDE_DIR] Found: ${WAYLAND_WLEGL_INCLUDE_DIR}")
++ else (WAYLAND_WLEGL_INCLUDE_DIR)
++ message(STATUS " [WAYLAND_WLEGL_INCLUDE_DIR] Could not find")
++ endif (WAYLAND_WLEGL_INCLUDE_DIR)
++
++ if (WAYLAND_WLCLIENT_INCLUDE_DIR AND WAYLAND_WLEGL_INCLUDE_DIR)
++ if (${WAYLAND_WLCLIENT_INCLUDE_DIR} STREQUAL ${WAYLAND_WLEGL_INCLUDE_DIR})
++ set (WAYLAND_INCLUDE_DIRS
++ ${WAYLAND_WLCLIENT_INCLUDE_DIR}
++ )
++ else (${WAYLAND_WLCLIENT_INCLUDE_DIR} STREQUAL ${WAYLAND_WLEGL_INCLUDE_DIR})
++ set (WAYLAND_INCLUDE_DIRS
++ ${WAYLAND_WLCLIENT_INCLUDE_DIR}
++ ${WAYLAND_WLEGL_INCLUDE_DIR}
++ )
++ endif (${WAYLAND_WLCLIENT_INCLUDE_DIR} STREQUAL ${WAYLAND_WLEGL_INCLUDE_DIR})
++ message(STATUS " [WAYLAND_INCLUDE_DIRS] Found: ${WAYLAND_INCLUDE_DIRS}")
++ else (WAYLAND_WLCLIENT_INCLUDE_DIR AND WAYLAND_WLEGL_INCLUDE_DIR)
++ message(STATUS " [WAYLAND_INCLUDE_DIRS] Could not find")
++ endif (WAYLAND_WLCLIENT_INCLUDE_DIR AND WAYLAND_WLEGL_INCLUDE_DIR)
++
++ #################################################################
++ #
++ # Finding Library
++ #
++ #################################################################
++
++ if (NOT WAYLAND_WLCLIENT_LIBRARY)
++ find_library(WAYLAND_WLCLIENT_LIBRARY
++ NAMES
++ wayland-client
++ PATHS
++ ${WAYLAND_WLCLIENT_PKG_CONFIG_LIBRARY_DIRS}
++ ${WLD}/usrfs/lib
++ )
++ endif (WAYLAND_WLCLIENT_LIBRARY)
++
++ if (NOT WAYLAND_WLEGL_LIBRARY)
++ find_library(WAYLAND_WLEGL_LIBRARY
++ NAMES
++ wayland-egl
++ PATHS
++ ${WAYLAND_WLEGL_PKG_CONFIG_LIBRARY_DIRS}
++ ${WLD}/usrfs/lib
++ )
++ endif (NOT WAYLAND_WLCLIENT_LIBRARY)
++
++ if (NOT WAYLAND_WLCURSOR_LIBRARY)
++ find_library(WAYLAND_WLCURSOR_LIBRARY
++ NAMES
++ wayland-cursor
++ PATHS
++ ${WAYLAND_CURSOR_PKG_CONFIG_LIBRARY_DIRS}
++ ${WLD}/usrfs/lib
++ )
++ endif (NOT WAYLAND_WLCURSOR_LIBRARY)
++
++ ################################################################
++ #
++ # Finding Result of Library
++ #
++ ################################################################
++
++ if (WAYLAND_WLCLIENT_LIBRARY)
++ message(STATUS " [WAYLAND_WLCLIENT_LIBRARY] Found: ${WAYLAND_WLCLIENT_LIBRARY}")
++ else (WAYLAND_WLCLIENT_LIBRARY)
++ message(STATUS " [WAYLAND_WLCLIENT_LIBRARY] Could not find")
++ endif (WAYLAND_WLCLIENT_LIBRARY)
++
++ if (WAYLAND_WLEGL_LIBRARY)
++ message(STATUS " [WAYLAND_WLEGL_LIBRARY] Found: ${WAYLAND_WLEGL_LIBRARY}")
++ else (WAYLAND_WLEGL_LIBRARY)
++ message(STATUS " [WAYLAND_WLEGL_LIBRARY] Could not find")
++ endif (WAYLAND_WLEGL_LIBRARY)
++
++ if (WAYLAND_WLCURSOR_LIBRARY)
++ message(STATUS " [WAYLAND_WLCURSOR_LIBRARY] Found: ${WAYLAND_WLCURSOR_LIBRARY}")
++ else (WAYLAND_WLCURSOR_LIBRARY)
++ message(STATUS " [WAYLAND_WLCURSOR_LIBRARY] Could not find")
++ endif (WAYLAND_WLCURSOR_LIBRARY)
++
++ if (WAYLAND_WLCLIENT_LIBRARY AND WAYLAND_WLEGL_LIBRARY AND WAYLAND_WLCURSOR_LIBRARY)
++ set (WAYLAND_LIBRARIES
++ ${WAYLAND_WLCLIENT_LIBRARY}
++ ${WAYLAND_WLEGL_LIBRARY}
++ ${WAYLAND_WLCURSOR_LIBRARY}
++ )
++ message(STATUS " [WAYLAND_LIBRARIES] Found: ${WAYLAND_LIBRARIES}")
++ else (WAYLAND_WLCLIENT_LIBRARY AND WAYLAND_WLEGL_LIBRARY AND WAYLAND_WLCURSOR_LIBRARY)
++ message(STATUS " [WAYLAND_LIBRARIES] Could not find")
++ endif (WAYLAND_WLCLIENT_LIBRARY AND WAYLAND_WLEGL_LIBRARY AND WAYLAND_WLCURSOR_LIBRARY)
++
++
++ if (WAYLAND_LIBRARIES AND WAYLAND_INCLUDE_DIRS)
++ set (USE_WAYLAND TRUE)
++ endif (WAYLAND_LIBRARIES AND WAYLAND_INCLUDE_DIRS)
++
++endif (USE_WAYLAND AND WAYLAND_LIBRARIES AND WAYLAND_INCLUDE_DIRS)
++
++message(STATUS "FindWayland.cmake: End")
++
+diff -urN navit/cmake/FindX11.cmake navit/cmake/FindX11.cmake
+--- navit/cmake/FindX11.cmake 1970-01-01 01:00:00.000000000 +0100
++++ navit/cmake/FindX11.cmake 2014-09-23 12:53:02.000000000 +0200
+@@ -0,0 +1,15 @@
++include(LibFindMacros)
++
++libfind_pkg_check_modules(X11_PKGCONFIG x11)
++
++FIND_PATH(X11_INCLUDE_DIR X11/Xlib.h
++ PATHS
++ ${X11_PKGCONFIG_INCLUDE_DIRS}
++ /usr/include
++)
++
++FIND_LIBRARY(X11_LIBRARY X11
++ PATHS
++ ${X11_PKGCONFIG_LIBRARY_DIRS}
++ /usr/lib
++)
+diff -urN navit/CMakeLists.txt navit/CMakeLists.txt
+--- navit/CMakeLists.txt 2014-10-20 15:21:29.325431500 +0200
++++ navit/CMakeLists.txt 2014-09-23 12:53:02.000000000 +0200
+@@ -110,6 +110,8 @@
+ find_package(SDL_ttf)
+ find_package(SDL_image)
+ find_package(OpenGL)
++find_package(Wayland)
++find_package(X11)
+ find_package(GLUT)
+ find_package(GTK2 2.6 COMPONENTS gtk)
+ find_package(XGettextGlade)
+@@ -283,10 +285,14 @@
+ message (STATUS "opengl found: ${OPENGL_gl_LIBRARY}")
+ include_directories(${OPENGL_INCLUDE_DIR})
+ if (USE_OPENGLES2)
++ include_directories(${OPENGLES2_INCLUDE_DIR};${WAYLAND_INCLUDE_DIRS})
+ set(USE_OPENGLES TRUE)
+- set(GRAPHICS_OPENGL_LIBRARY GLESv2 EGL)
++# set(GRAPHICS_OPENGL_LIBRARY ${OPENGLES2_glesv2_LIBRARY};${OPENGLES_EGL_LIBRARY};${X11_LIBRARY};${WAYLAND_LIBRARIES})
++ set(GRAPHICS_OPENGL_LIBRARY ${OPENGLES2_glesv2_LIBRARY};${OPENGLES_EGL_LIBRARY};${WAYLAND_LIBRARIES})
+ elseif (USE_OPENGLES)
+- set(GRAPHICS_OPENGL_LIBRARY GLESv1_CM EGL)
++ include_directories(${OPENGLES_INCLUDE_DIR})
++# set(GRAPHICS_OPENGL_LIBRARY ${OPENGLES_glesv1_CM_LIBRARY};${OPENGLES_EGL_LIBRARY};${X11_LIBRARY})
++ set(GRAPHICS_OPENGL_LIBRARY ${OPENGLES_glesv1_CM_LIBRARY};${OPENGLES_EGL_LIBRARY})
+ else()
+ set(GRAPHICS_OPENGL_LIBRARY ${OPENGL_gl_LIBRARY};${OPENGL_glu_LIBRARY};${GLUT_glut_LIBRARY})
+ endif(USE_OPENGLES2)
+diff -urN navit/.gitignore navit/.gitignore
+--- navit/.gitignore 2014-10-20 15:21:29.165431502 +0200
++++ navit/.gitignore 1970-01-01 01:00:00.000000000 +0100
+@@ -1,2 +0,0 @@
+-/.gitk-tmp.*
+-/CMakeLists.txt.user*
+diff -urN navit/navit/graphics/Makefile.am navit/navit/graphics/Makefile.am
+--- navit/navit/graphics/Makefile.am 2014-10-20 15:21:05.133431904 +0200
++++ navit/navit/graphics/Makefile.am 2014-09-23 12:53:02.000000000 +0200
+@@ -2,9 +2,9 @@
+ if GRAPHICS_ANDROID
+ SUBDIRS+=android
+ endif
+-if GRAPHICS_GTK_DRAWING_AREA
+- SUBDIRS+=gtk_drawing_area
+-endif
++#if GRAPHICS_GTK_DRAWING_AREA
++# SUBDIRS+=gtk_drawing_area
++#endif
+ if GRAPHICS_NULL
+ SUBDIRS+=null
+ endif
+diff -urN navit/navit/graphics/opengl/CMakeLists.txt navit/navit/graphics/opengl/CMakeLists.txt
+--- navit/navit/graphics/opengl/CMakeLists.txt 2014-10-20 15:21:04.565431914 +0200
++++ navit/navit/graphics/opengl/CMakeLists.txt 2014-09-23 12:53:02.000000000 +0200
+@@ -1,6 +1,11 @@
+ set(graphics_opengl_SOURCES graphics_opengl.c)
+ if (USE_OPENGLES)
+- LIST(APPEND graphics_opengl_SOURCES graphics_opengl_x11.c graphics_opengl_egl.c)
++# LIST(APPEND graphics_opengl_SOURCES graphics_opengl_x11.c graphics_opengl_egl.c)
++ LIST(APPEND graphics_opengl_SOURCES graphics_opengl_egl.c)
++ if (USE_WAYLAND)
++ LIST(APPEND graphics_opengl_SOURCES graphics_opengl_wayland.c)
++ endif (USE_WAYLAND)
+ endif (USE_OPENGLES)
+ module_add_library(graphics_opengl ${graphics_opengl_SOURCES})
++message(STATUS "Compiling graphics_opengl_SOURCES=${graphics_opengl_SOURCES}")
+
+diff -urN navit/navit/graphics/opengl/graphics_opengl.c navit/navit/graphics/opengl/graphics_opengl.c
+--- navit/navit/graphics/opengl/graphics_opengl.c 2014-10-20 15:21:04.557431914 +0200
++++ navit/navit/graphics/opengl/graphics_opengl.c 2014-09-23 12:53:02.000000000 +0200
+@@ -161,6 +161,7 @@
+ struct graphics_opengl_window_system_methods *window_system_methods;
+ struct graphics_opengl_platform *platform;
+ struct graphics_opengl_platform_methods *platform_methods;
++ struct graphics_opengl_wayland_window *wayland_window;
+ };
+
+ static struct graphics_priv *graphics_priv_root;
+@@ -216,7 +217,7 @@
+ attribute vec2 position; \
+ attribute vec2 texture_position; \
+ uniform mat4 mvp; \
+- varying vec2 v_texture_position; \
++ varying mediump vec2 v_texture_position; \
+ \
+ void main() \
+ { \
+@@ -230,7 +231,7 @@
+ uniform lowp vec4 avcolor; \
+ uniform sampler2D texture; \
+ uniform bool use_texture; \
+- varying vec2 v_texture_position; \
++ varying mediump vec2 v_texture_position; \
+ void main() \
+ { \
+ if (use_texture) { \
+@@ -1259,9 +1261,17 @@
+ }
+ #endif
+
++static struct event_priv *
++event_opengl_new(struct event_methods *meth);
++
+ static void *
+ get_data(struct graphics_priv *this, char *type)
+ {
++ const char* platform = getenv("NAVIT_PLATFORM");
++ if (platform == NULL) {
++ platform = "";
++ }
++
+ /*TODO initialize gtkglext context when type=="gtk_widget" */
+ if (!strcmp(type, "gtk_widget")) {
+ fprintf(stderr,
+@@ -1277,11 +1287,31 @@
+ GLfloat matrix[16];
+ int i;
+
+- this->window_system=graphics_opengl_x11_new(NULL, this->width, this->height, 32, &this->window_system_methods);
+- this->platform=graphics_opengl_egl_new(this->window_system_methods->get_display(this->window_system),
+- this->window_system_methods->get_window(this->window_system),
+- &this->platform_methods);
+- this->window_system_methods->set_callbacks(this->window_system, this, resize_callback_do, click_notify_do, motion_notify_do, NULL);
++ if (strcmp(platform, "wayland") == 0) {
++ this->wayland_window = graphics_opengl_wayland_new(
++ NULL, this->width, this->height, 0, &this->window_system_methods);
++ this->platform = graphics_opengl_egl_new(
++ this->window_system_methods->get_display(this->wayland_window),
++ this->window_system_methods->get_window(this->wayland_window),
++ &this->platform_methods);
++ this->window_system_methods->set_callbacks(
++ this->wayland_window, this, resize_callback_do,
++ click_notify_do, motion_notify_do, NULL);
++ } else {
++#if 0
++/* disable for temporary */
++ this->window_system = graphics_opengl_x11_new(
++ NULL, this->width, this->height, 32, &this->window_system_methods);
++ this->platform = graphics_opengl_egl_new(
++ this->window_system_methods->get_display(this->window_system),
++ this->window_system_methods->get_window(this->window_system),
++ &this->platform_methods);
++ this->window_system_methods->set_callbacks(
++ this->window_system, this, resize_callback_do,
++ click_notify_do, motion_notify_do, NULL);
++#endif
++ }
++
+ resize_callback(this->width,this->height);
+ #if 0
+ glClearColor ( 0.4 , 0.4 , 0.4 , 1);
+@@ -1333,9 +1363,17 @@
+ win->fullscreen = graphics_opengl_fullscreen;
+ win->disable_suspend = graphics_opengl_disable_suspend;
+ return win;
++ } else if (strcmp(type, "display") == 0) {
++ return (this->wayland_window) ? this->window_system_methods->get_display(this->wayland_window)
++ : NULL;
+ } else {
+ #ifdef USE_OPENGLES
+- return NULL;
++ if (strcmp(platform, "wayland") == 0) {
++ return this->window_system_methods->get_nativehandle(this->wayland_window);
++ }
++ else {
++ return NULL;
++ }
+ #else
+ return &this->DLid;
+ #endif
+@@ -1362,7 +1400,9 @@
+ {
+ gr->overlay_enabled = !disable;
+ gr->force_redraw = 1;
++#if 0
+ draw_mode(gr, draw_mode_end);
++#endif
+ }
+
+ static void
+diff -urN navit/navit/graphics/opengl/graphics_opengl.h navit/navit/graphics/opengl/graphics_opengl.h
+--- navit/navit/graphics/opengl/graphics_opengl.h 2014-10-20 15:21:04.561431914 +0200
++++ navit/navit/graphics/opengl/graphics_opengl.h 2014-09-23 12:53:02.000000000 +0200
+@@ -1,12 +1,13 @@
+ struct graphics_opengl_window_system;
+ struct graphics_opengl_platform;
+-
++struct graphics_opengl_wayland_window;
+
+ struct graphics_opengl_window_system_methods {
+- void (*destroy)(struct graphics_opengl_window_system *);
+- void *(*get_display)(struct graphics_opengl_window_system *);
+- void *(*get_window)(struct graphics_opengl_window_system *);
+- void (*set_callbacks)(struct graphics_opengl_window_system *, void *data, void *resize, void *button, void *motion, void *keypress);
++ void (*destroy)(void *);
++ void *(*get_display)(void *);
++ void *(*get_window)(void *);
++ void (*set_callbacks)(void *, void *data, void *resize, void *button, void *motion, void *keypress);
++ void *(*get_nativehandle)(void *);
+ };
+
+ struct graphics_opengl_platform_methods {
+@@ -16,3 +17,5 @@
+
+ struct graphics_opengl_window_system *graphics_opengl_x11_new(void *displayname, int w, int h, int depth, struct graphics_opengl_window_system_methods **methods);
+ struct graphics_opengl_platform *graphics_opengl_egl_new(void *display, void *window, struct graphics_opengl_platform_methods **methods);
++struct graphics_opengl_wayland_window *graphics_opengl_wayland_new(void *displayname, int w, int h, int depth, struct graphics_opengl_window_system_methods **methods);
++
+diff -urN navit/navit/graphics/opengl/graphics_opengl_wayland.c navit/navit/graphics/opengl/graphics_opengl_wayland.c
+--- navit/navit/graphics/opengl/graphics_opengl_wayland.c 1970-01-01 01:00:00.000000000 +0100
++++ navit/navit/graphics/opengl/graphics_opengl_wayland.c 2014-09-23 12:53:02.000000000 +0200
+@@ -0,0 +1,476 @@
++#include <stdio.h>
++#include <unistd.h>
++#include <glib.h>
++#include <EGL/egl.h>
++#include <linux/input.h>
++
++#include "wayland-client.h"
++#include "wayland-egl.h"
++
++#include "graphics_opengl.h"
++#include "callback.h"
++#include "event.h"
++#include "debug.h"
++
++struct graphics_opengl_wayland_display {
++ struct wl_display *wl_display;
++ struct wl_registry *wl_registry;
++ struct wl_compositor *wl_compositor;
++ struct wl_shell *wl_shell;
++ struct wl_seat *wl_seat;
++ struct wl_pointer *wl_pointer;
++ struct wl_touch *wl_touch;
++};
++
++struct graphics_opengl_wayland_window {
++ struct graphics_opengl_wayland_display *display;
++ int window_width;
++ int window_height;
++ struct wl_surface *wl_surface;
++ struct wl_shell_surface *wl_shell_surface;
++ struct wl_egl_window *wl_egl_window;
++
++ struct callback *callback;
++ struct event_watch *event_watch;
++ void *data;
++ void (*resize)(void *data, int w, int h);
++ void (*button)(void *data, int button, int state, int x, int y);
++ void (*motion)(void *data, int x, int y);
++ void *keypress;
++ int x;
++ int y;
++};
++
++/********************* input handling ****************************/
++
++static void
++pointer_handle_enter(void *data, struct wl_pointer *wl_pointer,
++ uint32_t serial, struct wl_surface *wl_surface,
++ wl_fixed_t sx, wl_fixed_t sy)
++{
++ (void)data;
++ (void)wl_pointer;
++ (void)serial;
++ (void)wl_surface;
++ (void)sx;
++ (void)sy;
++}
++
++static void
++pointer_handle_leave(void *data, struct wl_pointer *wl_pointer,
++ uint32_t serial, struct wl_surface *wl_surface)
++{
++ (void)data;
++ (void)wl_pointer;
++ (void)serial;
++ (void)wl_surface;
++}
++
++static void
++pointer_handle_motion(void *data, struct wl_pointer *wl_pointer,
++ uint32_t time, wl_fixed_t sx, wl_fixed_t sy)
++{
++ (void)wl_pointer;
++ (void)time;
++
++ struct graphics_opengl_wayland_window *window =
++ (struct graphics_opengl_wayland_window*)data;
++
++ int x = wl_fixed_to_int(sx);
++ int y = wl_fixed_to_int(sy);
++ window->motion(window->data, x, y);
++
++ window->x = x;
++ window->y = y;
++}
++
++static void
++pointer_handle_button(void *data, struct wl_pointer *wl_pointer,
++ uint32_t serial, uint32_t time, uint32_t button,
++ uint32_t state)
++{
++ (void)wl_pointer;
++ (void)serial;
++ (void)time;
++
++ struct graphics_opengl_wayland_window *window =
++ (struct graphics_opengl_wayland_window*)data;
++
++ if (button == BTN_LEFT && state == WL_POINTER_BUTTON_STATE_PRESSED)
++ {
++ window->button(window->data, 1, state, window->x, window->y);
++ }
++ else if (button == BTN_LEFT && state == WL_POINTER_BUTTON_STATE_RELEASED)
++ {
++ window->button(window->data, 1, state, window->x, window->y);
++ }
++}
++
++static void
++pointer_handle_axis(void *data, struct wl_pointer *wl_pointer,
++ uint32_t time, uint32_t axis, wl_fixed_t value)
++{
++ (void)wl_pointer;
++ (void)time;
++
++ struct graphics_opengl_wayland_window *window =
++ (struct graphics_opengl_wayland_window*)data;
++
++ int axis_value = wl_fixed_to_int(value);
++
++ if (0 > axis_value)
++ {
++ window->button(window->data, 4, 1, window->x, window->y);
++ window->button(window->data, 4, 0, window->x, window->y);
++ }
++ else
++ {
++ window->button(window->data, 5, 1, window->x, window->y);
++ window->button(window->data, 5, 0, window->x, window->y);
++ }
++}
++
++static void
++touch_handle_down(void *data, struct wl_touch *wl_touch,
++ uint32_t serial, uint32_t time, struct wl_surface *wl_surface,
++ int32_t id, wl_fixed_t xw, wl_fixed_t yw)
++{
++ (void)wl_touch;
++ (void)serial;
++ (void)time;
++ (void)wl_surface;
++
++ struct graphics_opengl_wayland_window *window =
++ (struct graphics_opengl_wayland_window*)data;
++
++ int x = wl_fixed_to_int(xw);
++ int y = wl_fixed_to_int(yw);
++ window->button(window->data, 1, 1, x, y);
++
++ window->x = x;
++ window->y = y;
++}
++
++static void
++touch_handle_up(void *data, struct wl_touch *wl_touch,
++ uint32_t serial, uint32_t time, int32_t id)
++{
++ (void)wl_touch;
++ (void)serial;
++ (void)time;
++ (void)id;
++
++ struct graphics_opengl_wayland_window *window =
++ (struct graphics_opengl_wayland_window*)data;
++
++ window->button(window->data, 1, 0, window->x, window->y);
++}
++
++static void
++touch_handle_motion(void *data, struct wl_touch *wl_touch,
++ uint32_t time, int32_t id, wl_fixed_t xw, wl_fixed_t yw)
++{
++ (void)wl_touch;
++ (void)time;
++ (void)id;
++
++ struct graphics_opengl_wayland_window *window =
++ (struct graphics_opengl_wayland_window*)data;
++
++ int x = wl_fixed_to_int(xw);
++ int y = wl_fixed_to_int(yw);
++ window->motion(window->data, x, y);
++
++ window->x = x;
++ window->y = y;
++}
++
++static void
++touch_handle_frame(void *data, struct wl_touch *wl_touch)
++{
++ (void)data;
++ (void)wl_touch;
++}
++
++static void
++touch_handle_cancel(void *data, struct wl_touch *wl_touch)
++{
++ (void)data;
++ (void)wl_touch;
++}
++
++static const struct wl_pointer_listener wl_pointer_listener = {
++ pointer_handle_enter,
++ pointer_handle_leave,
++ pointer_handle_motion,
++ pointer_handle_button,
++ pointer_handle_axis,
++};
++
++static const struct wl_touch_listener wl_touch_listener = {
++ touch_handle_down,
++ touch_handle_up,
++ touch_handle_motion,
++ touch_handle_frame,
++ touch_handle_cancel,
++};
++
++static void
++seat_handle_capabilities(void *data, struct wl_seat *wl_seat,
++ enum wl_seat_capability caps)
++{
++ struct graphics_opengl_wayland_window *window =
++ (struct graphics_opengl_wayland_window*)data;
++
++ if ((caps & WL_SEAT_CAPABILITY_POINTER) && !window->display->wl_pointer)
++ {
++ window->display->wl_pointer = wl_seat_get_pointer(wl_seat);
++ wl_pointer_add_listener(window->display->wl_pointer, &wl_pointer_listener, window);
++ }
++ else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && window->display->wl_pointer)
++ {
++ wl_pointer_destroy(window->display->wl_pointer);
++ window->display->wl_pointer = NULL;
++ }
++
++ if ((caps & WL_SEAT_CAPABILITY_TOUCH) && !window->display->wl_touch)
++ {
++ window->display->wl_touch = wl_seat_get_touch(wl_seat);
++ wl_touch_set_user_data(window->display->wl_touch, window);
++ wl_touch_add_listener(window->display->wl_touch, &wl_touch_listener, window);
++ }
++ else if (!(caps & WL_SEAT_CAPABILITY_TOUCH) && window->display->wl_touch)
++ {
++ wl_touch_destroy(window->display->wl_touch);
++ window->display->wl_touch = NULL;
++ }
++}
++
++static const struct wl_seat_listener wl_seat_listener = {
++ seat_handle_capabilities,
++};
++
++/********************* registry_handle_global ****************************/
++
++static void
++registry_handle_global(void *data, struct wl_registry *wl_registry, uint32_t name,
++ const char *interface, uint32_t version)
++{
++ (void)version;
++
++ struct graphics_opengl_wayland_window *window =
++ (struct graphics_opengl_wayland_window*)data;
++
++ if (strcmp(interface, "wl_compositor") == 0) {
++ window->display->wl_compositor =
++ wl_registry_bind(wl_registry, name,
++ &wl_compositor_interface, 1);
++/**
++ } else if (strcmp(interface, "wl_shell") == 0) {
++ window->display->wl_shell =
++ wl_registry_bind(wl_registry, name,
++ &wl_shell_interface, 1);
++**/
++ } else if (strcmp(interface, "wl_seat") == 0) {
++ window->display->wl_seat =
++ wl_registry_bind(wl_registry, name,
++ &wl_seat_interface, 1);
++ wl_seat_add_listener(window->display->wl_seat, &wl_seat_listener, window);
++ }
++}
++
++static const struct wl_registry_listener registry_listener = {
++ registry_handle_global,
++ NULL
++};
++
++/********************* set methods ****************************/
++
++static void *
++graphics_opengl_wayland_get_wl_display(void *data)
++{
++ struct graphics_opengl_wayland_window *window =
++ (struct graphics_opengl_wayland_window*)data;
++ return (void *)window->display->wl_display;
++}
++
++static void *
++graphics_opengl_wayland_get_wl_egl_window(void *data)
++{
++ struct graphics_opengl_wayland_window *window =
++ (struct graphics_opengl_wayland_window*)data;
++ return (void *)window->wl_egl_window;
++}
++
++static void
++graphics_opengl_wayland_set_callbacks(void *window_data,
++ void *data, void *resize, void *button, void *motion, void *keypress)
++{
++ struct graphics_opengl_wayland_window *window =
++ (struct graphics_opengl_wayland_window*)window_data;
++
++ window->data = data;
++ window->resize = resize;
++ window->button = button;
++ window->motion = motion;
++ window->keypress = keypress;
++}
++
++static void
++graphics_opengl_wayland_destroy(void *data)
++{
++ struct graphics_opengl_wayland_window *window =
++ (struct graphics_opengl_wayland_window*)data;
++
++ struct graphics_opengl_wayland_display *display;
++ display = window->display;
++
++ if (window->wl_shell_surface) {
++ wl_shell_surface_destroy(window->wl_shell_surface);
++ }
++
++ if (display->wl_shell) {
++ wl_shell_destroy(display->wl_shell);
++ }
++
++ if (display->wl_compositor) {
++ wl_compositor_destroy(display->wl_compositor);
++ }
++
++ wl_display_flush(display->wl_display);
++ wl_display_disconnect(display->wl_display);
++}
++
++static void *
++graphics_opengl_wayland_get_nativehandle(void *data)
++{
++ struct graphics_opengl_wayland_window *window =
++ (struct graphics_opengl_wayland_window*)data;
++
++ return (void *)window->wl_surface;
++}
++
++struct graphics_opengl_window_system_methods graphics_opengl_wayland_methods = {
++ graphics_opengl_wayland_destroy,
++ graphics_opengl_wayland_get_wl_display,
++ graphics_opengl_wayland_get_wl_egl_window,
++ graphics_opengl_wayland_set_callbacks,
++ graphics_opengl_wayland_get_nativehandle,
++};
++
++/********************* wl_shell_surface listener ****************************/
++
++static void
++handle_ping(void *data, struct wl_shell_surface *wl_shell_surface, uint32_t serial)
++{
++ (void)data;
++ wl_shell_surface_pong(wl_shell_surface, serial);
++}
++
++static void
++handle_configure(void *data, struct wl_shell_surface *wl_shell_surface,
++ uint32_t edges, int32_t width, int32_t height)
++{
++ (void)wl_shell_surface;
++ (void)edges;
++
++ struct graphics_opengl_wayland_window *window = data;
++ if (window->wl_egl_window)
++ wl_egl_window_resize(window->wl_egl_window, width, height, 0, 0);
++}
++
++static void
++handle_popup_done(void *data, struct wl_shell_surface *wl_shell_surface)
++{
++ (void)data;
++ (void)wl_shell_surface;
++}
++
++static struct wl_shell_surface_listener wl_shell_surface_listener = {
++ handle_ping,
++ handle_configure,
++ handle_popup_done
++};
++
++/********************* event_methods ****************************/
++
++static void
++graphics_opengl_wayland_watch(struct graphics_opengl_wayland_window *window)
++{
++ wl_display_dispatch(window->display->wl_display);
++}
++
++/********************* public function ****************************/
++
++struct graphics_opengl_wayland_window *
++graphics_opengl_wayland_new(void *displayname, int w, int h, int depth,
++ struct graphics_opengl_window_system_methods **methods)
++{
++ (void)displayname;
++ (void)depth;
++
++ struct graphics_opengl_wayland_display *display;
++ struct graphics_opengl_wayland_window *window;
++
++ /* Wayland Window Display Create */
++ display = (struct graphics_opengl_wayland_display*)malloc(
++ sizeof(struct graphics_opengl_wayland_display));
++ window = (struct graphics_opengl_wayland_window*)malloc(
++ sizeof(struct graphics_opengl_wayland_window));
++
++ memset(display, 0x00, sizeof(struct graphics_opengl_wayland_display));
++ memset(window, 0x00, sizeof(struct graphics_opengl_wayland_window));
++
++ window->display = display;
++ window->window_width = w;
++ window->window_height = h;
++
++ display->wl_display = wl_display_connect(NULL);
++ if (display->wl_display == NULL) {
++ dbg(0, "[ERROR] : failed to open wayland display(wl_display_connect)\n");
++ goto error;
++ }
++
++ display->wl_registry = wl_display_get_registry(display->wl_display);
++ wl_registry_add_listener(display->wl_registry, &registry_listener, window);
++
++ wl_display_dispatch(display->wl_display);
++ wl_display_roundtrip(display->wl_display);
++
++ *methods = &graphics_opengl_wayland_methods;
++
++ /* Create Window for egl_new */
++ window->wl_surface = wl_compositor_create_surface(window->display->wl_compositor);
++ if (window->display->wl_shell) {
++ window->wl_shell_surface = wl_shell_get_shell_surface(
++ window->display->wl_shell, window->wl_surface);
++ wl_shell_surface_add_listener(window->wl_shell_surface,
++ &wl_shell_surface_listener, window);
++ }
++
++ window->wl_egl_window = wl_egl_window_create(window->wl_surface,
++ window->window_width,
++ window->window_height);
++
++ if (window->display->wl_shell) {
++ wl_shell_surface_set_toplevel(window->wl_shell_surface);
++ }
++
++ /* Set Callback */
++ window->callback = callback_new_1(callback_cast(graphics_opengl_wayland_watch), window);
++ if (!event_request_system("glib", "graphics_opengl_wayland_new"))
++ goto error;
++
++ window->event_watch = event_add_watch(
++ (void *)wl_display_get_fd(window->display->wl_display),
++ event_watch_cond_read, window->callback);
++
++ return window;
++
++error:
++ dbg(0, "[ERROR] : graphics_opengl_wayland.c wayland_new\n");
++ graphics_opengl_wayland_destroy(window);
++ return NULL;
++}
++
++
+diff -urN navit/navit/graphics/opengl/graphics_opengl_x11.c navit/navit/graphics/opengl/graphics_opengl_x11.c
+--- navit/navit/graphics/opengl/graphics_opengl_x11.c 2014-10-20 15:21:04.565431914 +0200
++++ navit/navit/graphics/opengl/graphics_opengl_x11.c 2014-09-23 12:53:02.000000000 +0200
+@@ -24,8 +24,10 @@
+
+
+ static void
+-graphics_opengl_x11_destroy(struct graphics_opengl_window_system *x11)
++graphics_opengl_x11_destroy(void *data)
+ {
++ struct graphics_opengl_window_system *x11 =
++ (struct graphics_opengl_window_system*)data;
+ if (x11->watch)
+ event_remove_watch(x11->watch);
+ if (x11->cb)
+@@ -41,20 +43,27 @@
+ }
+
+ static void *
+-graphics_opengl_get_display(struct graphics_opengl_window_system *x11)
++graphics_opengl_get_display(void *data)
+ {
++ struct graphics_opengl_window_system *x11 =
++ (struct graphics_opengl_window_system*)data;
+ return x11->display;
+ }
+
+ static void *
+-graphics_opengl_get_window(struct graphics_opengl_window_system *x11)
++graphics_opengl_get_window(void *data)
+ {
++ struct graphics_opengl_window_system *x11 =
++ (struct graphics_opengl_window_system*)data;
+ return (void *)x11->window;
+ }
+
+ static void
+-graphics_opengl_set_callbacks(struct graphics_opengl_window_system *x11, void *data, void *resize, void *button, void *motion, void *keypress)
++graphics_opengl_set_callbacks(void *window_data, void *data, void *resize, void *button, void *motion, void *keypress)
+ {
++ struct graphics_opengl_window_system *x11 =
++ (struct graphics_opengl_window_system*)window_data;
++
+ x11->data=data;
+ x11->resize=resize;
+ x11->button=button;
+@@ -68,6 +77,7 @@
+ graphics_opengl_get_display,
+ graphics_opengl_get_window,
+ graphics_opengl_set_callbacks,
++ NULL,
+ };
+
+ static void
diff --git a/src/navigation/poi-cam/CMakeLists.txt b/src/navigation/poi-cam/CMakeLists.txt
index a646f57..7e5d772 100644
--- a/src/navigation/poi-cam/CMakeLists.txt
+++ b/src/navigation/poi-cam/CMakeLists.txt
@@ -24,26 +24,26 @@
#
# @licence end@
cmake_minimum_required(VERSION 2.8)
+
include(FindPkgConfig)
-include(${navit_SOURCE_DIR}/cmake/navit_macros.cmake)
+
+include(${navit_SRC_DIR}/navit/cmake/navit_macros.cmake)
+
+add_definitions(-DPLUGIN=1)
+
+pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
+pkg_search_module(GLIB glib-2.0)
+include_directories(${GLIB_INCLUDE_DIRS})
+include_directories(${DBUS_CPP_INCLUDE_DIRS})
+
include_directories(${INCLUDE_DIRECTORIES})
include_directories(.)
-include_directories(../../..)
-include_directories(compat_includes)
-include_directories(${navit_SOURCE_DIR}/..)
+include_directories(${navit_SRC_DIR}/navit)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
-link_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat_libs)
-add_definitions(-DPLUGIN=1)
-pkg_search_module(DBUS_CPP dbus-c++-glib-1 dbus-c++-1)
-include_directories(${DBUS_CPP_INCLUDE_DIRS})
+
+include_directories(${generated_api_DIR})
+
set(genivi_poiservice_cam_navit_LIBS ${DBUS_CPP_LDFLAGS})
-ADD_CUSTOM_COMMAND(OUTPUT genivi_poiservice_poicontentaccess_proxy.h
- COMMAND dbusxx-xml2cpp ${poi-service_API}/genivi-poiservice-poicontentaccess.xml --proxy=genivi_poiservice_poicontentaccess_proxy.h
- DEPENDS ${poi-service_API}/genivi-poiservice-poicontentaccess.xml
- )
-ADD_CUSTOM_COMMAND(OUTPUT genivi_poiservice_contentaccessmodule_adaptor.h
- COMMAND dbusxx-xml2cpp ${poi-service_API}/genivi-poiservice-contentaccessmodule.xml --adaptor=genivi_poiservice_contentaccessmodule_adaptor.h
- DEPENDS ${poi-service_API}/genivi-poiservice-contentaccessmodule.xml
- )
-module_add_library(genivi_poiservice_cam_navit genivi_poiservice_cam_navit.cxx genivi_poiservice_poicontentaccess_proxy.h genivi_poiservice_contentaccessmodule_adaptor.h)
+
+module_add_library(genivi_poiservice_cam_navit genivi_poiservice_cam_navit.cxx ${generated_api_DIR}/genivi-poiservice-poicontentaccess_proxy.h ${generated_api_DIR}/genivi-poiservice-contentaccessmodule_adaptor.h)
diff --git a/src/navigation/poi-cam/genivi_poiservice_cam_navit.cxx b/src/navigation/poi-cam/genivi_poiservice_cam_navit.cxx
index 645338f..dafcc3e 100644
--- a/src/navigation/poi-cam/genivi_poiservice_cam_navit.cxx
+++ b/src/navigation/poi-cam/genivi_poiservice_cam_navit.cxx
@@ -40,9 +40,9 @@
#include "navit/transform.h"
#include "navit/map.h"
#include "navit/mapset.h"
-#include "constants/genivi-poiservice-constants.h"
-#include "genivi_poiservice_poicontentaccess_proxy.h"
-#include "genivi_poiservice_contentaccessmodule_adaptor.h"
+#include "genivi-poiservice-constants.h"
+#include "genivi-poiservice-poicontentaccess_proxy.h"
+#include "genivi-poiservice-contentaccessmodule_adaptor.h"
#include <algorithm>
diff --git a/src/navigation/script/README b/src/navigation/script/README
index 5b76885..f422ed2 100644
--- a/src/navigation/script/README
+++ b/src/navigation/script/README
@@ -1,9 +1,20 @@
-Important notice:
-The order of the files included into the Makefile (by include *.mk) has to follow a specific order:
-positioning.mk
-navit.mk
-and others ..
-So, the way it's managed is the following:
-0 radical added to positioning.mk so now the file name is 0positioning.mk
-1 radical added to navit.mk sonow the file name is 1navit.mk
+For using the layer manager, you need to set the env variable and the paths:
+source set-ilm-env.sh
+
+To build the navigation middleware you need first to clone some additional stuff:
+./build.sh clone
+
+To build without the layer manager:
+./build.sh make
+
+To build with the layer manager:
+./build.sh makelm
+
+CMakeLists.txt organization:
+
+src/navigation/CMakeLists.txt
+To clone the sources located into different repositories
+To get the map
+
+src/navigation/map/CMakeLists.txt
diff --git a/src/navigation/script/build.sh b/src/navigation/script/build.sh
index dbbf341..2190cb2 100755
--- a/src/navigation/script/build.sh
+++ b/src/navigation/script/build.sh
@@ -61,11 +61,15 @@ set-path()
{
TOP_DIR=$target_root
TOP_BIN_DIR=$target_bin
-
+ API_DIR=$TOP_DIR/../../api
+ GENERATED_API_DIR=$API_DIR/include
+
NAVIGATION_CORE_SRC_DIR=$TOP_DIR/$NAVIGATION_CORE
+ NAVIGATION_CORE_BIN_DIR=$TOP_BIN_DIR/$NAVIGATION_CORE
NAVIGATION_CORE_API_DIR=$TOP_DIR/../../api/$NAVIGATION_CORE
MAP_VIEWER_SRC_DIR=$TOP_DIR/$MAP_VIEWER
+ MAP_VIEWER_BIN_DIR=$TOP_BIN_DIR/$MAP_VIEWER
MAP_VIEWER_API_DIR=$TOP_DIR/../../api/$MAP_VIEWER
POI_SERVICE_API_DIR=$TOP_DIR/../../api/$POI_SERVICE
@@ -74,34 +78,34 @@ set-path()
POI_CAM_BIN_DIR=$TOP_BIN_DIR/$POI_CAM
NAVIGATION_CORE_CONFIGURATION_SRC_DIR=$NAVIGATION_CORE_SRC_DIR/configuration-plugin
- NAVIGATION_CORE_CONFIGURATION_BIN_DIR=$TOP_BIN_DIR/$NAVIGATION_CORE_CONFIGURATION
+ NAVIGATION_CORE_CONFIGURATION_BIN_DIR=$NAVIGATION_CORE_BIN_DIR/$NAVIGATION_CORE_CONFIGURATION
NAVIGATION_CORE_GUIDANCE_SRC_DIR=$NAVIGATION_CORE_SRC_DIR/guidance-plugin
- NAVIGATION_CORE_GUIDANCE_BIN_DIR=$TOP_BIN_DIR/$NAVIGATION_CORE_GUIDANCE
+ NAVIGATION_CORE_GUIDANCE_BIN_DIR=$NAVIGATION_CORE_BIN_DIR/$NAVIGATION_CORE_GUIDANCE
NAVIGATION_CORE_LOCATIONINPUT_SRC_DIR=$NAVIGATION_CORE_SRC_DIR/locationinput-plugin
- NAVIGATION_CORE_LOCATIONINPUT_BIN_DIR=$TOP_BIN_DIR/$NAVIGATION_CORE_LOCATIONINPUT
+ NAVIGATION_CORE_LOCATIONINPUT_BIN_DIR=$NAVIGATION_CORE_BIN_DIR/$NAVIGATION_CORE_LOCATIONINPUT
NAVIGATION_CORE_MAPMATCHEDPOSITION_SRC_DIR=$NAVIGATION_CORE_SRC_DIR/mapmatchedposition-plugin
- NAVIGATION_CORE_MAPMATCHEDPOSITION_BIN_DIR=$TOP_BIN_DIR/$NAVIGATION_CORE_MAPMATCHEDPOSITION
+ NAVIGATION_CORE_MAPMATCHEDPOSITION_BIN_DIR=$NAVIGATION_CORE_BIN_DIR/$NAVIGATION_CORE_MAPMATCHEDPOSITION
NAVIGATION_CORE_ROUTING_SRC_DIR=$NAVIGATION_CORE_SRC_DIR/routing-plugin
- NAVIGATION_CORE_ROUTING_BIN_DIR=$TOP_BIN_DIR/$NAVIGATION_CORE_ROUTING
+ NAVIGATION_CORE_ROUTING_BIN_DIR=$NAVIGATION_CORE_BIN_DIR/$NAVIGATION_CORE_ROUTING
NAVIGATION_CORE_SESSION_SRC_DIR=$NAVIGATION_CORE_SRC_DIR/session-plugin
- NAVIGATION_CORE_SESSION_BIN_DIR=$TOP_BIN_DIR/$NAVIGATION_CORE_SESSION
+ NAVIGATION_CORE_SESSION_BIN_DIR=$NAVIGATION_CORE_BIN_DIR/$NAVIGATION_CORE_SESSION
NAVIGATION_CORE_ENHANCEDPOSITION_SRC_DIR=$NAVIGATION_CORE_SRC_DIR/enhancedposition-plugin
- NAVIGATION_CORE_ENHANCEDPOSITION_BIN_DIR=$TOP_BIN_DIR/$NAVIGATION_CORE_ENHANCEDPOSITION
+ NAVIGATION_CORE_ENHANCEDPOSITION_BIN_DIR=$NAVIGATION_CORE_BIN_DIR/$NAVIGATION_CORE_ENHANCEDPOSITION
MAP_VIEWER_CONFIGURATION_SRC_DIR=$MAP_VIEWER_SRC_DIR/configuration-plugin
- MAP_VIEWER_CONFIGURATION_BIN_DIR=$TOP_BIN_DIR/$MAP_VIEWER_CONFIGURATION
+ MAP_VIEWER_CONFIGURATION_BIN_DIR=$MAP_VIEWER_BIN_DIR/$MAP_VIEWER_CONFIGURATION
MAP_VIEWER_MAPVIEWERCONTROL_SRC_DIR=$MAP_VIEWER_SRC_DIR/mapviewercontrol-plugin
- MAP_VIEWER_MAPVIEWERCONTROL_BIN_DIR=$TOP_BIN_DIR/$MAP_VIEWER_MAPVIEWERCONTROL
+ MAP_VIEWER_MAPVIEWERCONTROL_BIN_DIR=$MAP_VIEWER_BIN_DIR/$MAP_VIEWER_MAPVIEWERCONTROL
MAP_VIEWER_SESSION_SRC_DIR=$MAP_VIEWER_SRC_DIR/session-plugin
- MAP_VIEWER_SESSION_BIN_DIR=$TOP_BIN_DIR/$MAP_VIEWER_SESSION
+ MAP_VIEWER_SESSION_BIN_DIR=$MAP_VIEWER_BIN_DIR/$MAP_VIEWER_SESSION
POSITIONING_SRC_DIR=$target_positioning
POSITIONING_BIN_DIR=$TOP_BIN_DIR/$POSITIONING
@@ -118,6 +122,8 @@ set-path()
NAVIT_SRC_DIR=$TOP_DIR/$NAVIT
NAVIT_BIN_DIR=$TOP_BIN_DIR/$NAVIT
+ MAP_DIR=$TOP_DIR/map
+
IVI_LAYER_MANAGER_SRC_DIR=$target_ilm
IVI_LAYER_MANAGER_BIN_DIR=$TOP_BIN_DIR/$IVI_LAYER_MANAGER
WAYLAND_IVI_EXTENSION_SRC_DIR=$IVI_LAYER_MANAGER_SRC_DIR/$WAYLAND_IVI_EXTENSION
@@ -148,10 +154,8 @@ usage() {
clone() {
echo ''
- echo 'Clone/update version of additional sources if needed'
+ echo 'Clone/update version of additional sources if needed, get maps'
cd $TOP_DIR
- mkdir -p bin
- cd $TOP_BIN_DIR
cmake -Dpositioning_SRC_DIR=$target_positioning -Dlayer-management_SRC_DIR=$target_ilm $TOP_DIR
}
@@ -159,7 +163,14 @@ build() {
echo ''
echo 'Building navigation'
- clone
+ if [ ! -d "$NAVIT_SRC_DIR" ]; then
+ echo 'Do clone first'
+ exit 1
+ fi
+
+ cd $TOP_DIR
+ mkdir -p bin
+ cd $TOP_BIN_DIR
if [ $lm -eq 1 ]; then
echo ''
@@ -200,6 +211,11 @@ build() {
cmake $NAVIT_FLAGS $NAVIT_SRC_DIR/navit && make
echo ''
+ echo 'Create maps xml files for navit'
+ cd $MAP_DIR
+ cmake -DNAVIT_MAPS_DIR=$NAVIT_BIN_DIR/navit/maps ./
+
+ echo ''
echo 'Building positioning'
cd $TOP_BIN_DIR
mkdir -p $POSITIONING
@@ -225,66 +241,89 @@ build() {
cmake -DWITH_GPSD=OFF -DWITH_DLT=OFF -DWITH_REPLAYER=ON -DWITH_TESTS=OFF $ENHANCED_POSITION_SERVICE_SRC_DIR && make
echo ''
+ echo 'Generate DBus include files'
+
+ cmake $API_DIR/$NAVIGATION_CORE
+ cmake $API_DIR/$MAP_VIEWER
+ cmake $API_DIR/$POI_SERVICE
+
+ echo ''
echo 'Building plugins'
- cd $TOP_BIN_DIR
+
+ cd $TOP_BIN_DIR
+ mkdir -p $NAVIGATION_CORE
+ cd $NAVIGATION_CORE_BIN_DIR
+ cmake -Dnavit_SRC_DIR=$NAVIT_SRC_DIR $NAVIGATION_CORE_SRC_DIR
+
+ cd $NAVIGATION_CORE_BIN_DIR
mkdir -p $NAVIGATION_CORE_CONFIGURATION
cd $NAVIGATION_CORE_CONFIGURATION_BIN_DIR
- cmake -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -Dnavigationcore_API=$NAVIGATION_CORE_API_DIR $NAVIGATION_CORE_CONFIGURATION_SRC_DIR && make
+ cmake -Wno-dev -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -Dgenerated_api_DIR=$GENERATED_API_DIR -Dnavit_SRC_DIR=$NAVIT_SRC_DIR $NAVIGATION_CORE_CONFIGURATION_SRC_DIR && make
- cd $TOP_BIN_DIR
+ cd $NAVIGATION_CORE_BIN_DIR
mkdir -p $NAVIGATION_CORE_GUIDANCE
cd $NAVIGATION_CORE_GUIDANCE_BIN_DIR
- cmake -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -Dnavigationcore_API=$NAVIGATION_CORE_API_DIR $NAVIGATION_CORE_GUIDANCE_SRC_DIR && make
+ cmake -Wno-dev -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -Dgenerated_api_DIR=$GENERATED_API_DIR -Dnavit_SRC_DIR=$NAVIT_SRC_DIR $NAVIGATION_CORE_GUIDANCE_SRC_DIR && make
- cd $TOP_BIN_DIR
+ cd $NAVIGATION_CORE_BIN_DIR
mkdir -p $NAVIGATION_CORE_LOCATIONINPUT
cd $NAVIGATION_CORE_LOCATIONINPUT_BIN_DIR
- cmake -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -Dnavigationcore_API=$NAVIGATION_CORE_API_DIR $NAVIGATION_CORE_LOCATIONINPUT_SRC_DIR && make
+ cmake -Wno-dev -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -Dgenerated_api_DIR=$GENERATED_API_DIR -Dnavit_SRC_DIR=$NAVIT_SRC_DIR $NAVIGATION_CORE_LOCATIONINPUT_SRC_DIR && make
- cd $TOP_BIN_DIR
+ cd $NAVIGATION_CORE_BIN_DIR
mkdir -p $NAVIGATION_CORE_MAPMATCHEDPOSITION
cd $NAVIGATION_CORE_MAPMATCHEDPOSITION_BIN_DIR
- cmake -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -Dnavigationcore_API=$NAVIGATION_CORE_API_DIR $NAVIGATION_CORE_MAPMATCHEDPOSITION_SRC_DIR && make
+ cmake -Wno-dev -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -Dgenerated_api_DIR=$GENERATED_API_DIR -Dnavit_SRC_DIR=$NAVIT_SRC_DIR $NAVIGATION_CORE_MAPMATCHEDPOSITION_SRC_DIR && make
- cd $TOP_BIN_DIR
+ cd $NAVIGATION_CORE_BIN_DIR
mkdir -p $NAVIGATION_CORE_ROUTING
cd $NAVIGATION_CORE_ROUTING_BIN_DIR
- cmake -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -Dnavigationcore_API=$NAVIGATION_CORE_API_DIR $NAVIGATION_CORE_ROUTING_SRC_DIR && make
+ cmake -Wno-dev -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -Dgenerated_api_DIR=$GENERATED_API_DIR -Dnavit_SRC_DIR=$NAVIT_SRC_DIR $NAVIGATION_CORE_ROUTING_SRC_DIR && make
- cd $TOP_BIN_DIR
+ cd $NAVIGATION_CORE_BIN_DIR
mkdir -p $NAVIGATION_CORE_SESSION
cd $NAVIGATION_CORE_SESSION_BIN_DIR
- cmake -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -Dnavigationcore_API=$NAVIGATION_CORE_API_DIR $NAVIGATION_CORE_SESSION_SRC_DIR && make
+ cmake -Wno-dev -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -Dgenerated_api_DIR=$GENERATED_API_DIR -Dnavit_SRC_DIR=$NAVIT_SRC_DIR $NAVIGATION_CORE_SESSION_SRC_DIR && make
- cd $TOP_BIN_DIR
+ cd $NAVIGATION_CORE_BIN_DIR
mkdir -p $NAVIGATION_CORE_ENHANCEDPOSITION
cd $NAVIGATION_CORE_ENHANCEDPOSITION_BIN_DIR
- cmake -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -Dpositioning_API=$POSITIONING_API_DIR $NAVIGATION_CORE_ENHANCEDPOSITION_SRC_DIR && make
+ cmake -Wno-dev -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -Dpositioning_API=$POSITIONING_API_DIR -Dapi_DIR=$API_DIR -Dgenerated_api_DIR=$GENERATED_API_DIR -Dnavit_SRC_DIR=$NAVIT_SRC_DIR $NAVIGATION_CORE_ENHANCEDPOSITION_SRC_DIR && make
- cd $TOP_BIN_DIR
+ cd $TOP_BIN_DIR
+ mkdir -p $MAP_VIEWER
+ cd $MAP_VIEWER_BIN_DIR
+ cmake -Dnavit_SRC_DIR=$NAVIT_SRC_DIR $MAP_VIEWER_SRC_DIR
+
+ cd $MAP_VIEWER_BIN_DIR
mkdir -p $MAP_VIEWER_CONFIGURATION
cd $MAP_VIEWER_CONFIGURATION_BIN_DIR
- cmake -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -Dmapviewer_API=$MAP_VIEWER_API_DIR $MAP_VIEWER_CONFIGURATION_SRC_DIR && make
+ cmake -Wno-dev -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -Dgenerated_api_DIR=$GENERATED_API_DIR -Dnavit_SRC_DIR=$NAVIT_SRC_DIR $MAP_VIEWER_CONFIGURATION_SRC_DIR && make
- cd $TOP_BIN_DIR
+ cd $MAP_VIEWER_BIN_DIR
mkdir -p $MAP_VIEWER_MAPVIEWERCONTROL
cd $MAP_VIEWER_MAPVIEWERCONTROL_BIN_DIR
- cmake -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -DLM=$lm -Dlayer_management_INST=$layer_management_INST -Dmapviewer_API=$MAP_VIEWER_API_DIR -Dnavigationcore_API=$NAVIGATION_CORE_API_DIR $MAP_VIEWER_MAPVIEWERCONTROL_SRC_DIR && make
+ cmake -Wno-dev -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -DLM=$lm -Dlayer_management_INST=$layer_management_INST -Dgenerated_api_DIR=$GENERATED_API_DIR -Dnavit_SRC_DIR=$NAVIT_SRC_DIR $MAP_VIEWER_MAPVIEWERCONTROL_SRC_DIR && make
- cd $TOP_BIN_DIR
+ cd $MAP_VIEWER_BIN_DIR
mkdir -p $MAP_VIEWER_SESSION
cd $MAP_VIEWER_SESSION_BIN_DIR
- cmake -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -Dmapviewer_API=$MAP_VIEWER_API_DIR $MAP_VIEWER_SESSION_SRC_DIR && make
+ cmake -Wno-dev -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -Dgenerated_api_DIR=$GENERATED_API_DIR -Dnavit_SRC_DIR=$NAVIT_SRC_DIR $MAP_VIEWER_SESSION_SRC_DIR && make
cd $TOP_BIN_DIR
mkdir -p $POI_CAM
cd $POI_CAM_BIN_DIR
- cmake -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -Dpoi-service_API=$POI_SERVICE_API_DIR $POI_CAM_SRC_DIR && make
+ cmake -Wno-dev -C $NAVIT_BIN_DIR/cmake_plugin_settings.txt -Dgenerated_api_DIR=$GENERATED_API_DIR -Dnavit_SRC_DIR=$NAVIT_SRC_DIR $POI_CAM_SRC_DIR && make
}
clean() {
echo 'delete' $TOP_BIN_DIR
+
+ if [ -d "$IVI_LAYER_MANAGER_BIN_DIR" ]; then
+ sudo rm -rf $IVI_LAYER_MANAGER_BIN_DIR
+ fi
+
rm -rf $TOP_BIN_DIR
}
diff --git a/src/poi-service/poi-server/CMakeLists.txt b/src/poi-service/poi-server/CMakeLists.txt
index ebd24d9..5e9648b 100644
--- a/src/poi-service/poi-server/CMakeLists.txt
+++ b/src/poi-service/poi-server/CMakeLists.txt
@@ -43,6 +43,7 @@ include_directories(${DBUS_CPP_GLIB_INCLUDE_DIRS})
set (git_get_src_version git rev-parse HEAD)
set (git_executable git)
+set(cmake_create_dir cmake -E make_directory)
# Check if positioning stuff with the right version has been cloned and make it if necessary
# set(positioning_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../positioning)
@@ -89,15 +90,20 @@ else()
endif()
endif()
-# Generate the DBus adaptors and proxy before building the client
+# Generate the DBus adaptors and proxy of positioning
set(API_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../api)
-set(TARGET_GENERATED_API_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../poi-common)
+
+execute_process(
+ WORKING_DIRECTORY ${API_DIR}
+ COMMAND ${cmake_create_dir} include
+)
+
+set(TARGET_GENERATED_API_DIR ${API_DIR}/include)
+
set(positioning_API_DIR ${positioning_SRC}/enhanced-position-service/api)
file (GLOB XML_TO_DBUS_PROXY
- ${API_DIR}/poi-service/genivi-poiservice-contentaccessmodule.xml
${positioning_SRC_DIR}/enhanced-position-service/api/genivi-positioning-enhancedposition.xml
- ${API_DIR}/navigation-core/genivi-navigationcore-routing.xml
)
foreach (RAW_FILE ${XML_TO_DBUS_PROXY})
get_filename_component(FILE ${RAW_FILE} NAME_WE)
@@ -115,8 +121,7 @@ foreach (RAW_FILE ${XML_TO_DBUS_PROXY})
endforeach()
file (GLOB XML_TO_DBUS_ADAPTOR
- ${API_DIR}/poi-service/genivi-poiservice-poisearch.xml
- ${API_DIR}/poi-service/genivi-poiservice-poicontentaccess.xml
+ ${positioning_SRC_DIR}/enhanced-position-service/api/genivi-positioning-enhancedposition.xml
)
foreach (RAW_FILE ${XML_TO_DBUS_ADAPTOR})
get_filename_component(FILE ${RAW_FILE} NAME_WE)
@@ -133,28 +138,6 @@ foreach (RAW_FILE ${XML_TO_DBUS_ADAPTOR})
endif()
endforeach()
-file (GLOB XML_TO_DBUS_CONSTANT
- ${API_DIR}/poi-service/genivi-poiservice-constants.xml
- ${API_DIR}/map-viewer/genivi-mapviewer-constants.xml
- ${API_DIR}/navigation-core/genivi-navigationcore-constants.xml
-)
-foreach (RAW_FILE ${XML_TO_DBUS_CONSTANT})
- get_filename_component(FILE ${RAW_FILE} NAME_WE)
- if(NOT EXISTS ${TARGET_GENERATED_API_DIR}/${FILE}.h)
- execute_process(
- OUTPUT_FILE ${TARGET_GENERATED_API_DIR}/${FILE}.h
- COMMAND ${XSLTPROC} ${API_DIR}/poi-service/enum.xsl ${RAW_FILE}
- )
- else()
- if(${RAW_FILE} IS_NEWER_THAN ${TARGET_GENERATED_API_DIR}/${FILE}.h)
- execute_process(
- OUTPUT_FILE ${TARGET_GENERATED_API_DIR}/${FILE}.h
- COMMAND ${XSLTPROC} ${API_DIR}/poi-service/enum.xsl ${RAW_FILE}
- )
- endif()
- endif()
-endforeach()
-
file (GLOB XML_TO_DBUS_CONSTANT_FROM_POSITIONING
${positioning_SRC_DIR}/enhanced-position-service/api/genivi-positioning-constants.xml
)
@@ -169,13 +152,13 @@ foreach (RAW_FILE ${XML_TO_DBUS_CONSTANT_FROM_POSITIONING})
if(${RAW_FILE} IS_NEWER_THAN ${TARGET_GENERATED_API_DIR}/${FILE}.h)
execute_process(
OUTPUT_FILE ${TARGET_GENERATED_API_DIR}/${FILE}.h
- COMMAND ${XSLTPROC} ${API_DIR}/poi-service/enum.xsl ${RAW_FILE}
+ COMMAND ${XSLTPROC} ${API_DIR}/poi-service/enum.xsl ${RAW_FILE} #use another enum.xsl for radix consistency
)
endif()
endif()
endforeach()
-file(GLOB DBUS_DEF_INCLUDE ${DBUS_DEF_DIR}/*_proxy.h ${DBUS_DEF_DIR}/*_adaptor.h ${DBUS_DEF_DIR}/*-constants.h)
+file(GLOB DBUS_DEF_INCLUDE ${TARGET_GENERATED_API_DIR}/*_proxy.h ${TARGET_GENERATED_API_DIR}/*_adaptor.h ${TARGET_GENERATED_API_DIR}/*-constants.h)
link_directories(
${DBUS_CPP_LIBRARY_DIRS}
diff --git a/src/poi-service/poi-server/poi-server-class.h b/src/poi-service/poi-server/poi-server-class.h
index de5b884..9a62b2f 100644
--- a/src/poi-service/poi-server/poi-server-class.h
+++ b/src/poi-service/poi-server/poi-server-class.h
@@ -28,15 +28,15 @@
#ifndef POIPOCSERVERCLASS_H
#define POIPOCSERVERCLASS_H
-#include "../poi-common/genivi-positioning-constants.h"
-#include "../poi-common/genivi-mapviewer-constants.h"
-#include "../poi-common/genivi-navigationcore-constants.h"
-#include "../poi-common/genivi-poiservice-constants.h"
-#include "../poi-common/genivi-poiservice-poisearch_adaptor.h"
-#include "../poi-common/genivi-poiservice-poicontentaccess_adaptor.h"
-#include "../poi-common/genivi-navigationcore-routing_proxy.h"
-#include "../poi-common/genivi-positioning-enhancedposition_proxy.h"
-#include "../poi-common/genivi-poiservice-contentaccessmodule_proxy.h"
+#include "../../../api/include/genivi-positioning-constants.h"
+#include "../../../api/include/genivi-mapviewer-constants.h"
+#include "../../../api/include/genivi-navigationcore-constants.h"
+#include "../../../api/include/genivi-poiservice-constants.h"
+#include "../../../api/include/genivi-poiservice-poisearch_adaptor.h"
+#include "../../../api/include/genivi-poiservice-poicontentaccess_adaptor.h"
+#include "../../../api/include/genivi-navigationcore-routing_proxy.h"
+#include "../../../api/include/genivi-positioning-enhancedposition_proxy.h"
+#include "../../../api/include/genivi-poiservice-contentaccessmodule_proxy.h"
#include "../poi-common/common-data-model.h"
#include <dbus-c++/glib-integration.h>
diff --git a/src/poi-service/script/build.sh b/src/poi-service/script/build.sh
index 2342211..fe755bb 100755
--- a/src/poi-service/script/build.sh
+++ b/src/poi-service/script/build.sh
@@ -17,7 +17,7 @@
# @licence end@
###########################################################################
TOP_DIR=$PWD/..
-TOP_BIN_DIR=$PWD/../bin
+TOP_BIN_DIR=$TOP_DIR/bin
POI_SERVER=poi-server
POI_SERVER_SRC_DIR=$TOP_DIR/$POI_SERVER
@@ -27,6 +27,12 @@ POSITIONING_SRC_DIR=$TOP_DIR/positioning
POI_COMMON=poi-common
POI_COMMON_SRC_DIR=$TOP_DIR/$POI_COMMON
+API_DIR=$TOP_DIR/../../api
+
+NAVIGATION_CORE=navigation-core
+MAP_VIEWER=map-viewer
+POI_SERVICE=poi-service
+
usage() {
echo "Usage: ./build.sh Build poi-server"
echo " or: ./build.sh [command]"
@@ -35,6 +41,7 @@ usage() {
echo " make Build"
echo " clean Clean"
echo " src-clean Clean the cloned sources"
+ echo " clone Clone the sources"
echo " help Print Help"
echo
echo
@@ -43,16 +50,33 @@ usage() {
build() {
echo ''
echo 'Building poi-server'
- mkdir -p $POI_SERVER_BIN_DIR
- cd $POI_SERVER_BIN_DIR
- cmake -Dpositioning_SRC_DIR=$POSITIONING_SRC_DIR $POI_SERVER_SRC_DIR && make
+
+ if [ ! -d "$POSITIONING_SRC_DIR" ]; then
+ echo 'Do clone first'
+ exit 1
+ fi
+
+ echo 'Generate DBus include files'
+
+ cmake $API_DIR/$NAVIGATION_CORE
+ cmake $API_DIR/$MAP_VIEWER
+ cmake $API_DIR/$POI_SERVICE
+
+ make
+}
+
+clone() {
+ echo ''
+ echo 'Clone/update version of additional sources if needed'
+ cd $TOP_DIR
+ mkdir -p bin
+ cd $TOP_BIN_DIR
+ cmake -Dpositioning_SRC_DIR=$POSITIONING_SRC_DIR $POI_SERVER_SRC_DIR
}
clean() {
echo 'delete' $POI_SERVER_BIN_DIR
rm -rf $POI_SERVER_BIN_DIR
- echo 'delete dbus generated files'
- rm -f $POI_COMMON_SRC_DIR/*_adaptor.h $POI_COMMON_SRC_DIR/*_proxy.h $POI_COMMON_SRC_DIR/*-constants.h
}
src-clean() {
@@ -72,6 +96,8 @@ if [ $# -ge 1 ]; then
clean
elif [ $1 = src-clean ]; then
src-clean
+ elif [ $1 = clone ]; then
+ clone
else
usage
fi