diff options
author | <philippe colliot> | 2015-05-22 16:58:01 +0200 |
---|---|---|
committer | <philippe colliot> | 2015-05-22 16:58:01 +0200 |
commit | c1a72ad05760f13d1e5edb2a3c5fbfbdbc88e686 (patch) | |
tree | c68d0dd340eb259262114a5c3f76380146e4f3c7 | |
parent | ba6e342c5a4792f1e12487e1028af0622139e5cf (diff) | |
download | poi-service-c1a72ad05760f13d1e5edb2a3c5fbfbdbc88e686.tar.gz |
Full cmake build in progress (to be completed!)
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | api/map-viewer/CMakeLists.txt | 67 | ||||
-rw-r--r-- | api/navigation-core/CMakeLists.txt | 70 | ||||
-rw-r--r-- | api/poi-service/CMakeLists.txt | 68 | ||||
-rw-r--r-- | src/navigation/CMakeLists.txt | 304 | ||||
-rwxr-xr-x | src/navigation/patches/0001-add-wayland-ilm-support-navit.patch | 1052 | ||||
-rwxr-xr-x | src/navigation/patches/0001-client.pro-Disable-create_cmake-configuration.patch | 25 | ||||
-rwxr-xr-x | src/navigation/patches/0002-Update-ivi-application.xml-and-fix-inplementation-of.patch | 103 | ||||
-rw-r--r-- | src/navigation/patches/cmake_current_source_dir_for_navit.diff | 39 | ||||
-rw-r--r-- | src/navigation/patches/search_list_get_unique.diff | 2 | ||||
-rw-r--r-- | src/navigation/script/README | 76 | ||||
-rwxr-xr-x | src/navigation/script/set-env-ilm.sh | 17 | ||||
-rw-r--r-- | src/navigation/script/toolchain.cmake | 4 |
13 files changed, 139 insertions, 1689 deletions
@@ -5,6 +5,7 @@ *-Release/ bin/ positioning/ +build/ #files *~ diff --git a/api/map-viewer/CMakeLists.txt b/api/map-viewer/CMakeLists.txt index 7f93d58..a45dbbf 100644 --- a/api/map-viewer/CMakeLists.txt +++ b/api/map-viewer/CMakeLists.txt @@ -23,55 +23,17 @@ message(STATUS "generation of DBus files for map-viewer") find_program(XSLTPROC xsltproc REQUIRED) find_program(DBUSXML2CPP dbusxx-xml2cpp REQUIRED) -set(cmake_create_dir cmake -E make_directory) - -set(API_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..) - -execute_process( - WORKING_DIRECTORY ${API_DIR} - COMMAND ${cmake_create_dir} include -) - -set(TARGET_GENERATED_API_DIR ${API_DIR}/include) - -file (GLOB XML_TO_DBUS_PROXY - ${CMAKE_CURRENT_SOURCE_DIR}/genivi-mapviewer-configuration.xml - ${CMAKE_CURRENT_SOURCE_DIR}/genivi-mapviewer-mapviewercontrol.xml - ${CMAKE_CURRENT_SOURCE_DIR}/genivi-mapviewer-session.xml -) -foreach (RAW_FILE ${XML_TO_DBUS_PROXY}) - get_filename_component(FILE ${RAW_FILE} NAME_WE) - if(NOT EXISTS ${TARGET_GENERATED_API_DIR}/${FILE}_proxy.h) - execute_process( - COMMAND ${DBUSXML2CPP} ${RAW_FILE} --proxy=${TARGET_GENERATED_API_DIR}/${FILE}_proxy.h - ) - else() - if(${RAW_FILE} IS_NEWER_THAN ${TARGET_GENERATED_API_DIR}/${FILE}_proxy.h) - execute_process( - COMMAND ${DBUSXML2CPP} ${RAW_FILE} --proxy=${TARGET_GENERATED_API_DIR}/${FILE}_proxy.h - ) - endif() - endif() -endforeach() - -file (GLOB XML_TO_DBUS_ADAPTOR +file (GLOB XML_TO_DBUS ${CMAKE_CURRENT_SOURCE_DIR}/genivi-mapviewer-configuration.xml ${CMAKE_CURRENT_SOURCE_DIR}/genivi-mapviewer-mapviewercontrol.xml ${CMAKE_CURRENT_SOURCE_DIR}/genivi-mapviewer-session.xml ) -foreach (RAW_FILE ${XML_TO_DBUS_ADAPTOR}) +foreach (RAW_FILE ${XML_TO_DBUS}) get_filename_component(FILE ${RAW_FILE} NAME_WE) - if(NOT EXISTS ${TARGET_GENERATED_API_DIR}/${FILE}_adaptor.h) - execute_process( - COMMAND ${DBUSXML2CPP} ${RAW_FILE} --adaptor=${TARGET_GENERATED_API_DIR}/${FILE}_adaptor.h - ) - else() - if(${RAW_FILE} IS_NEWER_THAN ${TARGET_GENERATED_API_DIR}/${FILE}_adaptor.h) - execute_process( - COMMAND ${DBUSXML2CPP} ${RAW_FILE} --adaptor=${TARGET_GENERATED_API_DIR}/${FILE}_adaptor.h - ) - endif() - endif() + execute_process( + COMMAND ${DBUSXML2CPP} ${RAW_FILE} --proxy=${CMAKE_CURRENT_BINARY_DIR}/${FILE}_proxy.h + COMMAND ${DBUSXML2CPP} ${RAW_FILE} --adaptor=${CMAKE_CURRENT_BINARY_DIR}/${FILE}_adaptor.h + ) endforeach() file (GLOB XML_TO_DBUS_CONSTANT @@ -79,17 +41,8 @@ file (GLOB XML_TO_DBUS_CONSTANT ) 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} ${CMAKE_CURRENT_SOURCE_DIR}/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} ${CMAKE_CURRENT_SOURCE_DIR}/enum.xsl ${RAW_FILE} - ) - endif() - endif() + execute_process( + OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/${FILE}.h + COMMAND ${XSLTPROC} ${CMAKE_CURRENT_SOURCE_DIR}/enum.xsl ${RAW_FILE} + ) endforeach() diff --git a/api/navigation-core/CMakeLists.txt b/api/navigation-core/CMakeLists.txt index 5b8ac55..694b17d 100644 --- a/api/navigation-core/CMakeLists.txt +++ b/api/navigation-core/CMakeLists.txt @@ -23,41 +23,7 @@ message(STATUS "generation of DBus files for navigation-core") find_program(XSLTPROC xsltproc REQUIRED) find_program(DBUSXML2CPP dbusxx-xml2cpp REQUIRED) -set(cmake_create_dir cmake -E make_directory) - -set(API_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..) - -execute_process( - WORKING_DIRECTORY ${API_DIR} - COMMAND ${cmake_create_dir} include -) - -set(TARGET_GENERATED_API_DIR ${API_DIR}/include) - -file (GLOB XML_TO_DBUS_PROXY - ${CMAKE_CURRENT_SOURCE_DIR}/genivi-navigationcore-configuration.xml - ${CMAKE_CURRENT_SOURCE_DIR}/genivi-navigationcore-guidance.xml - ${CMAKE_CURRENT_SOURCE_DIR}/genivi-navigationcore-locationinput.xml - ${CMAKE_CURRENT_SOURCE_DIR}/genivi-navigationcore-mapmatchedposition.xml - ${CMAKE_CURRENT_SOURCE_DIR}/genivi-navigationcore-routing.xml - ${CMAKE_CURRENT_SOURCE_DIR}/genivi-navigationcore-session.xml -) -foreach (RAW_FILE ${XML_TO_DBUS_PROXY}) - get_filename_component(FILE ${RAW_FILE} NAME_WE) - if(NOT EXISTS ${TARGET_GENERATED_API_DIR}/${FILE}_proxy.h) - execute_process( - COMMAND ${DBUSXML2CPP} ${RAW_FILE} --proxy=${TARGET_GENERATED_API_DIR}/${FILE}_proxy.h - ) - else() - if(${RAW_FILE} IS_NEWER_THAN ${TARGET_GENERATED_API_DIR}/${FILE}_proxy.h) - execute_process( - COMMAND ${DBUSXML2CPP} ${RAW_FILE} --proxy=${TARGET_GENERATED_API_DIR}/${FILE}_proxy.h - ) - endif() - endif() -endforeach() - -file (GLOB XML_TO_DBUS_ADAPTOR +file (GLOB XML_TO_DBUS ${CMAKE_CURRENT_SOURCE_DIR}/genivi-navigationcore-configuration.xml ${CMAKE_CURRENT_SOURCE_DIR}/genivi-navigationcore-guidance.xml ${CMAKE_CURRENT_SOURCE_DIR}/genivi-navigationcore-locationinput.xml @@ -65,19 +31,12 @@ file (GLOB XML_TO_DBUS_ADAPTOR ${CMAKE_CURRENT_SOURCE_DIR}/genivi-navigationcore-routing.xml ${CMAKE_CURRENT_SOURCE_DIR}/genivi-navigationcore-session.xml ) -foreach (RAW_FILE ${XML_TO_DBUS_ADAPTOR}) +foreach (RAW_FILE ${XML_TO_DBUS}) get_filename_component(FILE ${RAW_FILE} NAME_WE) - if(NOT EXISTS ${TARGET_GENERATED_API_DIR}/${FILE}_adaptor.h) - execute_process( - COMMAND ${DBUSXML2CPP} ${RAW_FILE} --adaptor=${TARGET_GENERATED_API_DIR}/${FILE}_adaptor.h - ) - else() - if(${RAW_FILE} IS_NEWER_THAN ${TARGET_GENERATED_API_DIR}/${FILE}_adaptor.h) - execute_process( - COMMAND ${DBUSXML2CPP} ${RAW_FILE} --adaptor=${TARGET_GENERATED_API_DIR}/${FILE}_adaptor.h - ) - endif() - endif() + execute_process( + COMMAND ${DBUSXML2CPP} ${RAW_FILE} --proxy=${CMAKE_CURRENT_BINARY_DIR}/${FILE}_proxy.h + COMMAND ${DBUSXML2CPP} ${RAW_FILE} --adaptor=${CMAKE_CURRENT_BINARY_DIR}/${FILE}_adaptor.h + ) endforeach() file (GLOB XML_TO_DBUS_CONSTANT @@ -85,17 +44,8 @@ file (GLOB XML_TO_DBUS_CONSTANT ) 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} ${CMAKE_CURRENT_SOURCE_DIR}/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} ${CMAKE_CURRENT_SOURCE_DIR}/enum.xsl ${RAW_FILE} - ) - endif() - endif() + execute_process( + OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/${FILE}.h + COMMAND ${XSLTPROC} ${CMAKE_CURRENT_SOURCE_DIR}/enum.xsl ${RAW_FILE} + ) endforeach() diff --git a/api/poi-service/CMakeLists.txt b/api/poi-service/CMakeLists.txt index a631dde..12c93e8 100644 --- a/api/poi-service/CMakeLists.txt +++ b/api/poi-service/CMakeLists.txt @@ -23,57 +23,18 @@ message(STATUS "generation of DBus files for poi-service") find_program(XSLTPROC xsltproc REQUIRED) find_program(DBUSXML2CPP dbusxx-xml2cpp REQUIRED) -set(cmake_create_dir cmake -E make_directory) - -set(API_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..) - -execute_process( - WORKING_DIRECTORY ${API_DIR} - COMMAND ${cmake_create_dir} include -) - -set(TARGET_GENERATED_API_DIR ${API_DIR}/include) - -file (GLOB XML_TO_DBUS_PROXY - ${CMAKE_CURRENT_SOURCE_DIR}/genivi-poiservice-contentaccessmodule.xml - ${CMAKE_CURRENT_SOURCE_DIR}/genivi-poiservice-poicontentaccess.xml - ${CMAKE_CURRENT_SOURCE_DIR}/genivi-poiservice-poisearch.xml - ${CMAKE_CURRENT_SOURCE_DIR}/genivi-poiservice-configuration.xml -) -foreach (RAW_FILE ${XML_TO_DBUS_PROXY}) - get_filename_component(FILE ${RAW_FILE} NAME_WE) - if(NOT EXISTS ${TARGET_GENERATED_API_DIR}/${FILE}_proxy.h) - execute_process( - COMMAND ${DBUSXML2CPP} ${RAW_FILE} --proxy=${TARGET_GENERATED_API_DIR}/${FILE}_proxy.h - ) - else() - if(${RAW_FILE} IS_NEWER_THAN ${TARGET_GENERATED_API_DIR}/${FILE}_proxy.h) - execute_process( - COMMAND ${DBUSXML2CPP} ${RAW_FILE} --proxy=${TARGET_GENERATED_API_DIR}/${FILE}_proxy.h - ) - endif() - endif() -endforeach() - -file (GLOB XML_TO_DBUS_ADAPTOR +file (GLOB XML_TO_DBUS ${CMAKE_CURRENT_SOURCE_DIR}/genivi-poiservice-contentaccessmodule.xml ${CMAKE_CURRENT_SOURCE_DIR}/genivi-poiservice-poicontentaccess.xml ${CMAKE_CURRENT_SOURCE_DIR}/genivi-poiservice-poisearch.xml ${CMAKE_CURRENT_SOURCE_DIR}/genivi-poiservice-configuration.xml ) -foreach (RAW_FILE ${XML_TO_DBUS_ADAPTOR}) +foreach (RAW_FILE ${XML_TO_DBUS}) get_filename_component(FILE ${RAW_FILE} NAME_WE) - if(NOT EXISTS ${TARGET_GENERATED_API_DIR}/${FILE}_adaptor.h) - execute_process( - COMMAND ${DBUSXML2CPP} ${RAW_FILE} --adaptor=${TARGET_GENERATED_API_DIR}/${FILE}_adaptor.h - ) - else() - if(${RAW_FILE} IS_NEWER_THAN ${TARGET_GENERATED_API_DIR}/${FILE}_adaptor.h) - execute_process( - COMMAND ${DBUSXML2CPP} ${RAW_FILE} --adaptor=${TARGET_GENERATED_API_DIR}/${FILE}_adaptor.h - ) - endif() - endif() + execute_process( + COMMAND ${DBUSXML2CPP} ${RAW_FILE} --proxy=${CMAKE_CURRENT_BINARY_DIR}/${FILE}_proxy.h + COMMAND ${DBUSXML2CPP} ${RAW_FILE} --adaptor=${CMAKE_CURRENT_BINARY_DIR}/${FILE}_adaptor.h + ) endforeach() file (GLOB XML_TO_DBUS_CONSTANT @@ -81,17 +42,8 @@ file (GLOB XML_TO_DBUS_CONSTANT ) 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} ${CMAKE_CURRENT_SOURCE_DIR}/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} ${CMAKE_CURRENT_SOURCE_DIR}/enum.xsl ${RAW_FILE} - ) - endif() - endif() + execute_process( + OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/${FILE}.h + COMMAND ${XSLTPROC} ${CMAKE_CURRENT_SOURCE_DIR}/enum.xsl ${RAW_FILE} + ) endforeach() diff --git a/src/navigation/CMakeLists.txt b/src/navigation/CMakeLists.txt index d70295b..889f567 100644 --- a/src/navigation/CMakeLists.txt +++ b/src/navigation/CMakeLists.txt @@ -18,291 +18,43 @@ project(navigation) cmake_minimum_required(VERSION 2.8) -message(STATUS "navigation") +set(API_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../api") +set(navit_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/navit") -find_package(PkgConfig REQUIRED) -find_program(XSLTPROC xsltproc REQUIRED) -find_program(GIT git) -find_program(SVN svn) +option(WITH_FRANCA_INTERFACE + "Build using the Franca interfaces" OFF) +option(WITH_DBUS_INTERFACE + "Build using the D-Bus interfaces" ON) +option(WITH_DEBUG + "Enable the debug messages" OFF) +option(NAVIT_DISABLE_QT + "Disable Qt to build navit" 1) +option(NAVIT_SAMPLE_MAP + "Use a sample map for navit" 0) +option(NAVIT_NULL_VEHICLE + "Vehicle null for navit" 1) +option(NAVIT_QTPAINTER + "qtqpainter for navit" 0) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) +set(DISABLE_QT "${NAVIT_DISABLE_QT}") +set(SAMPLE_MAP "${NAVIT_SAMPLE_MAP}") +set(vehicle/null "${NAVIT_NULL_VEHICLE}") +set(graphics/qt_qpainter "${NAVIT_QTPAINTER}") -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) +add_subdirectory(navit/navit) -set (svn_executable ${SVN}) -set (svn_get_src_version svnversion) +set(NAVIT_MAPS_DIR "${CMAKE_CURRENT_BINARY_DIR}/navit/navit/navit/maps") -set(cmake_create_dir cmake -E make_directory) -set (apply_patch_git patch -p1 -s) -set (apply_patch_svn patch -p0 -s) +add_subdirectory(map) -set(WITH_LM $ENV{WLD}) +add_subdirectory(positioning) -# ..............................Get the wayland-ivi-extension code.............................. +add_subdirectory(${API_DIR}/navigation-core "${CMAKE_CURRENT_BINARY_DIR}/navigation-core") -# Check if ivi layer management stuff with the right version has been cloned and do it if necessary -# ilm is cloned into sub dir -set(wayland-ivi-extension_SRC_DIR ${layer-management_SRC_DIR}/wayland-ivi-extension) -set(weston-ivi-shell_SRC_DIR ${layer-management_SRC_DIR}/weston-ivi-shell) -set(wayland-ivi-extension_URL http://git.projects.genivi.org/wayland-ivi-extension.git) -set(wayland-ivi-extension_VERSION 278437417d1ac0958a800eecfebd2a388d6d9ca7) +add_subdirectory(${API_DIR}/map-viewer "${CMAKE_CURRENT_BINARY_DIR}/map-viewer") -if (EXISTS ${wayland-ivi-extension_SRC_DIR}) - execute_process( - COMMAND ${git_get_src_version} - WORKING_DIRECTORY "${wayland-ivi-extension_SRC_DIR}" - RESULT_VARIABLE result - OUTPUT_VARIABLE version - ) - if (${version} MATCHES ${wayland-ivi-extension_VERSION}) - message(STATUS "version of wayland-ivi-extension up to date") - else() - message(STATUS "get the right version of wayland-ivi-extension") - execute_process( - COMMAND "${git_executable}" pull - COMMAND "${git_executable}" checkout ${wayland-ivi-extension_VERSION} - WORKING_DIRECTORY "${wayland-ivi-extension_SRC_DIR}" - RESULT_VARIABLE error_code - ) - if(error_code) - message(FATAL_ERROR "Failed to checkout version: '${wayland-ivi-extension_VERSION}'") - endif() - endif() -else() - message(STATUS "clone wayland-ivi-extension") - execute_process( - COMMAND "${git_executable}" clone "${wayland-ivi-extension_URL}" "${wayland-ivi-extension_SRC_DIR}" - RESULT_VARIABLE error_code - ) - if(error_code) - message(FATAL_ERROR "Failed to clone repository: '${wayland-ivi-extension_URL}'") - endif() - message(STATUS "get the right version of wayland-ivi-extension") - execute_process( - COMMAND "${git_executable}" pull - COMMAND "${git_executable}" checkout ${wayland-ivi-extension_VERSION} - WORKING_DIRECTORY "${wayland-ivi-extension_SRC_DIR}" - RESULT_VARIABLE error_code - ) - if(error_code) - message(FATAL_ERROR "Failed to checkout version: '${wayland-ivi-extension_VERSION}'") - endif() -endif() - -# ..............................Get the weston-ivi-shell code.............................. - -set(weston-ivi-shell_URL https://github.com/ntanibata/weston-ivi-shell.git) -set(weston-ivi-shell_VERSION a3dd3192343e573e9cbf349022cb81b77bfbdaca) -set(weston-ivi-shell_PATCH_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/patches) -set(weston-ivi-shell_PATCH_DUMMY_FILE ${weston-ivi-shell_SRC_DIR}/.patched) - -if (EXISTS ${weston-ivi-shell_SRC_DIR}) - execute_process( - COMMAND ${git_get_src_version} - WORKING_DIRECTORY "${weston-ivi-shell_SRC_DIR}" - RESULT_VARIABLE result - OUTPUT_VARIABLE version - ) - if (${version} MATCHES ${weston-ivi-shell_VERSION}) - message(STATUS "version of weston-ivi-shell up to date") - else() - message(STATUS "get the right version of weston-ivi-shell") - execute_process( - COMMAND "${git_executable}" pull - COMMAND "${git_executable}" checkout ${weston-ivi-shell_VERSION} - WORKING_DIRECTORY "${weston-ivi-shell_SRC_DIR}" - RESULT_VARIABLE error_code - ) - if(error_code) - message(FATAL_ERROR "Failed to checkout version: '${weston-ivi-shell_VERSION}'") - endif() - endif() -else() - message(STATUS "clone weston-ivi-shell") - execute_process( - COMMAND "${git_executable}" clone "${weston-ivi-shell_URL}" "${weston-ivi-shell_SRC_DIR}" - RESULT_VARIABLE error_code - ) - if(error_code) - message(FATAL_ERROR "Failed to clone repository: '${weston-ivi-shell_URL}'") - endif() - message(STATUS "get the right version of weston-ivi-shell") - execute_process( - COMMAND "${git_executable}" pull - COMMAND "${git_executable}" checkout ${weston-ivi-shell_VERSION} - WORKING_DIRECTORY "${weston-ivi-shell_SRC_DIR}" - RESULT_VARIABLE error_code - ) - if(error_code) - message(FATAL_ERROR "Failed to checkout version: '${weston-ivi-shell_VERSION}'") - endif() -endif() - -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 ${apply_patch_git} -i ${weston-ivi-shell_PATCH_SRC_DIR}/0001-client.pro-Disable-create_cmake-configuration.patch - COMMAND ${apply_patch_git} -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}" - RESULT_VARIABLE error_code - ) - if(error_code) - message(FATAL_ERROR "Failed to apply the patch") - endif() -endif() - -# ..............................Get the positioning code.............................. - -# Check if positioning stuff with the right version has been cloned and do it if necessary -# positioning_SRC_DIR is set by cmake -Dpositioning_SRC_DIR=<path to positioning src dir> -set(positioning_URL http://git.projects.genivi.org/lbs/positioning.git) -set(positioning_VERSION 3a1254f9ac4f5e2d088d24598e76764874a40b99) - -if (EXISTS ${positioning_SRC_DIR}) - execute_process(COMMAND ${git_get_src_version} - WORKING_DIRECTORY "${positioning_SRC_DIR}" - RESULT_VARIABLE result - OUTPUT_VARIABLE version) - if (${version} MATCHES ${positioning_VERSION}) - message(STATUS "version of positioning up to date") - else() - message(STATUS "get the right version of positioning") - execute_process( - COMMAND "${git_executable}" pull - COMMAND "${git_executable}" checkout ${positioning_VERSION} - WORKING_DIRECTORY "${positioning_SRC_DIR}" - RESULT_VARIABLE error_code - ) - if(error_code) - message(FATAL_ERROR "Failed to checkout version: '${positioning_VERSION}'") - endif() - endif() -else() - message(STATUS "clone positioning") - execute_process( - COMMAND "${git_executable}" clone "${positioning_URL}" "${positioning_SRC_DIR}" - RESULT_VARIABLE error_code - ) - if(error_code) - message(FATAL_ERROR "Failed to clone repository: '${positioning_URL}'") - endif() - - message(STATUS "get the right version of positioning") - execute_process( - COMMAND "${git_executable}" pull - COMMAND "${git_executable}" checkout ${positioning_VERSION} - WORKING_DIRECTORY "${positioning_SRC_DIR}" - RESULT_VARIABLE error_code - ) - if(error_code) - message(FATAL_ERROR "Failed to checkout version: '${positioning_VERSION}'") - endif() -endif() - -# ..............................Get the navit code.............................. - -# Check if navit stuff with the right version has been cloned and do it if necessary -set(navit_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/navit) -set(navit_URL http://svn.code.sf.net/p/navit/code/trunk) -set(navit_VERSION 6084) -set(navit_PATCH_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/patches) -set(navit_PATCH_DUMMY_FILE_SPELL ${navit_SRC_DIR}/.patched-spell) -set(navit_PATCH_DUMMY_FILE_LM ${navit_SRC_DIR}/.patched-lm) - -if (EXISTS ${navit_SRC_DIR}) - execute_process(COMMAND ${svn_get_src_version} - WORKING_DIRECTORY "${navit_SRC_DIR}" - RESULT_VARIABLE result - OUTPUT_VARIABLE version) - if (${version} MATCHES ${navit_VERSION}) - message(STATUS "version of navit up to date") - else() - message(STATUS "get the right version of navit") - execute_process( - COMMAND "${svn_executable}" checkout ${navit_URL} navit -r ${navit_VERSION} - WORKING_DIRECTORY "${navit_SRC_DIR}/.." - RESULT_VARIABLE error_code - ) - if(error_code) - message(FATAL_ERROR "Failed to checkout version: '${navit_VERSION}'") - endif() - endif() -else() - message(STATUS "clone navit") - execute_process( - COMMAND "${svn_executable}" checkout ${navit_URL} navit -r ${navit_VERSION} - WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - RESULT_VARIABLE error_code - ) - if(error_code) - message(FATAL_ERROR "Failed to clone repository: '${navit_URL}'") - endif() -endif() - -# apply spell patch if necessary -if (EXISTS ${navit_PATCH_DUMMY_FILE_SPELL}) - message(STATUS "patch spell already applied to navit") -else() - message(STATUS "apply the patch spell to navit") - execute_process( - COMMAND ${apply_patch_svn} -i ${navit_PATCH_SRC_DIR}/search_list_get_unique.diff - COMMAND ${create_file} ${navit_PATCH_DUMMY_FILE_SPELL} - 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 spell") - endif() -endif() - -# apply layer manager patch if necessary -if (WITH_LM) - if (EXISTS ${navit_PATCH_DUMMY_FILE_LM}) - message(STATUS "patch lm already applied to navit") - else() - message(STATUS "apply the patches to navit") - execute_process( - COMMAND ${apply_patch_git} -i ${navit_PATCH_SRC_DIR}/0001-add-wayland-ilm-support-navit.patch - COMMAND ${create_file} ${navit_PATCH_DUMMY_FILE_LM} - 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 lm") - endif() - endif() -endif() - -# ..............................Get the database.............................. - -# 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_URL http://www.navit-project.org/${MAP_FILE}) -set(wget wget -O) - -if (NOT EXISTS ${map_SRC_DIR}/${MAP_FILE}) - message(STATUS "get the map") - execute_process( - COMMAND ${wget} "${map_SRC_DIR}/${MAP_FILE}.tmp" "${map_URL}" - RESULT_VARIABLE error_code - ) - if(error_code) - message(FATAL_ERROR "Failed to get map: '${MAP_FILE}', what about your proxy ?") - endif() - execute_process( - COMMAND mv "${map_SRC_DIR}/${MAP_FILE}.tmp" ${map_SRC_DIR}/${MAP_FILE} - ) -endif() +add_subdirectory(${API_DIR}/poi-service "${CMAKE_CURRENT_BINARY_DIR}/poi-service") +add_subdirectory(navigation-core) diff --git a/src/navigation/patches/0001-add-wayland-ilm-support-navit.patch b/src/navigation/patches/0001-add-wayland-ilm-support-navit.patch deleted file mode 100755 index bac36a9..0000000 --- a/src/navigation/patches/0001-add-wayland-ilm-support-navit.patch +++ /dev/null @@ -1,1052 +0,0 @@ -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, ®istry_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/patches/0001-client.pro-Disable-create_cmake-configuration.patch b/src/navigation/patches/0001-client.pro-Disable-create_cmake-configuration.patch deleted file mode 100755 index 926bb77..0000000 --- a/src/navigation/patches/0001-client.pro-Disable-create_cmake-configuration.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 9112aeed43f40eeeefd20484e14eedcee6c80544 Mon Sep 17 00:00:00 2001 -From: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp> -Date: Fri, 3 Oct 2014 14:43:37 +0900 -Subject: [PATCH] client.pro: Disable create_cmake configuration - -Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp> ---- - src/client/client.pro | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/client/client.pro b/src/client/client.pro -index fd094fd..c9dc668 100644 ---- a/src/client/client.pro -+++ b/src/client/client.pro -@@ -8,6 +8,7 @@ MODULE_PLUGIN_TYPES = wayland-graphics-integration-client - load(qt_module) - - CONFIG += link_pkgconfig qpa/genericunixfontdatabase wayland-scanner -+CONFIG -= create_cmake - - !equals(QT_WAYLAND_GL_CONFIG, nogl) { - DEFINES += QT_WAYLAND_GL_SUPPORT --- -1.9.1 - diff --git a/src/navigation/patches/0002-Update-ivi-application.xml-and-fix-inplementation-of.patch b/src/navigation/patches/0002-Update-ivi-application.xml-and-fix-inplementation-of.patch deleted file mode 100755 index 979d531..0000000 --- a/src/navigation/patches/0002-Update-ivi-application.xml-and-fix-inplementation-of.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 8f61a686557ae1b8930f8a4771415586c22cb628 Mon Sep 17 00:00:00 2001 -From: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp> -Date: Mon, 6 Oct 2014 10:49:07 +0900 -Subject: [PATCH] Update ivi-application.xml, and fix inplementation of - qwaylandivisurface class - -Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp> ---- - src/3rdparty/protocol/ivi-application.xml | 41 +++++++++++-------------------- - src/client/qwaylandivisurface.cpp | 5 +++- - src/client/qwaylandivisurface_p.h | 2 +- - 3 files changed, 19 insertions(+), 29 deletions(-) - -diff --git a/src/3rdparty/protocol/ivi-application.xml b/src/3rdparty/protocol/ivi-application.xml -index 833fd38..0c3fb8c 100644 ---- a/src/3rdparty/protocol/ivi-application.xml -+++ b/src/3rdparty/protocol/ivi-application.xml -@@ -42,36 +42,23 @@ - <arg name="visibility" type="int"/> - </event> - -- <enum name="warning_code"> -- <description summary="possible warning codes returned by ivi compositor"> -- These define all possible warning codes returned by ivi compositor on server-side warnings. -- invalid_wl_surface: -- - wl_surface already has a another role. -- - wl_surface is destroyed before the ivi_surface is destroyed. -- ivi_id_in_use: ivi_id is already assigned by another application. -- </description> -- <entry name="invalid_wl_surface" value="1" summary="wl_surface is invalid"/> -- <entry name="ivi_id_in_use" value="2" summary="ivi_id is in use and can not be shared"/> -- </enum> -+ <event name="configure"> -+ <description summary="suggest resize"> -+ The configure event asks the client to resize its surface. - -- <event name="warning"> -- <description summary="server-side warning detected"> -- The ivi compositor encountered warning while processing a request by this -- application. The warning is defined by argument warning_code and optional -- warning_text. If the warning is detected, client shall destroy the ivi_surface -- object. -+ The size is a hint, in the sense that the client is free to -+ ignore it if it doesn't resize, pick a smaller size (to -+ satisfy aspect ratio or resize in steps of NxM pixels). - -- When a warning event is sent, the compositor turns the ivi_surface object inert. -- The ivi_surface will not deliver further events, all requests on it are ignored -- except 'destroy', and the association to the ivi_id is removed. The client -- should destroy the ivi_surface object. If an inert ivi_surface object is used as -- an argument to any other object's request, that request will [produce a fatal -- error / produce a warning / be ignored]. -- </description> -- <arg name="warning_code" type="int"/> -- <arg name="warning_text" type="string" allow-null="true"/> -- </event> -+ The client is free to dismiss all but the last configure -+ event it received. - -+ The width and height arguments specify the size of the window -+ in surface local coordinates. -+ </description> -+ <arg name="width" type="int"/> -+ <arg name="height" type="int"/> -+ </event> - </interface> - - <interface name="ivi_application" version="1"> -diff --git a/src/client/qwaylandivisurface.cpp b/src/client/qwaylandivisurface.cpp -index d3fd096..1c2c24a 100644 ---- a/src/client/qwaylandivisurface.cpp -+++ b/src/client/qwaylandivisurface.cpp -@@ -63,10 +63,13 @@ QWaylandIviSurface::~QWaylandIviSurface() - - void QWaylandIviSurface::ivi_surface_visibility(int32_t visibility) - { -+ Q_UNUSED(visibility); - } - --void QWaylandIviSurface::ivi_surface_warning(int32_t warning_code, const QString &warning_text) -+void QWaylandIviSurface::ivi_surface_configure(int32_t width, int32_t height) - { -+ Q_UNUSED(width); -+ Q_UNUSED(height); - } - - QT_END_NAMESPACE -diff --git a/src/client/qwaylandivisurface_p.h b/src/client/qwaylandivisurface_p.h -index 2283f99..f4038e6 100644 ---- a/src/client/qwaylandivisurface_p.h -+++ b/src/client/qwaylandivisurface_p.h -@@ -63,7 +63,7 @@ public: - - private: - void ivi_surface_visibility(int32_t visibility) Q_DECL_OVERRIDE; -- void ivi_surface_warning(int32_t warning_code, const QString &warning_text) Q_DECL_OVERRIDE; -+ void ivi_surface_configure(int32_t width, int32_t height) Q_DECL_OVERRIDE; - - friend class QWaylandWindow; - QWaylandWindow *m_window; --- -1.9.1 - diff --git a/src/navigation/patches/cmake_current_source_dir_for_navit.diff b/src/navigation/patches/cmake_current_source_dir_for_navit.diff new file mode 100644 index 0000000..79e5540 --- /dev/null +++ b/src/navigation/patches/cmake_current_source_dir_for_navit.diff @@ -0,0 +1,39 @@ +Index: navit/CMakeLists.txt +=================================================================== +--- navit/CMakeLists.txt (revision 6084) ++++ navit/CMakeLists.txt (working copy) +@@ -22,7 +22,7 @@ + set(PACKAGE "navit") + set(PACKAGE_STRING "${PACKAGE} ${PACKAGE_VERSION}") + +-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") ++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/") + include("${PROJECT_SOURCE_DIR}/cmake/navit_macros.cmake") + + IF(NOT CMAKE_BUILD_TYPE) +@@ -102,13 +102,13 @@ + add_module(autoload/osso "Default" FALSE) + add_module(map/garmin "Garmin library not found" FALSE) + add_feature(USE_NATIVE_LANGUAGE_SUPPORT "Gettext not found and not on Windows" FALSE) +-set(CPACK_PROJECT_CONFIG_FILE "${CMAKE_SOURCE_DIR}/cpack.cmake") ++set(CPACK_PROJECT_CONFIG_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cpack.cmake") + set(CPACK_PACKAGE_VENDOR "Navit team") + set(CPACK_PACKAGE_VERSION_MAJOR ${NAVIT_VERSION_MAJOR}) + set(CPACK_PACKAGE_VERSION_MINOR ${NAVIT_VERSION_MINOR}) + set(CPACK_PACKAGE_VERSION_PATCH "${NAVIT_VERSION_PATCH}") +-set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README") +-set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/GPL-2") ++set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") ++set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/GPL-2") + set(CPACK_NSIS_PACKAGE_NAME "Navit ${PACKAGE_VERSION}") + set(CPACK_PACKAGE_FILE_NAME ${PACKAGE}) + set(CPACK_PACKAGE_EXECUTABLES "navit;Navit") +@@ -413,7 +413,7 @@ + add_module(map/mg "Default" TRUE) + endif(NOT MSVC) + add_module_plugin(support/shapefile "Default" TRUE) +-set(map_shapefile_INCLUDES "${CMAKE_SOURCE_DIR}/navit/support/shapefile") ++set(map_shapefile_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/navit/support/shapefile") + #set(map_shapefile_LIBRARY_DIRS "${CMAKE_BINARY_DIR}/navit/support/shapefile") + set(map_shapefile_LIBS "support_shapefile") + add_module(map/shapefile "Default" TRUE) diff --git a/src/navigation/patches/search_list_get_unique.diff b/src/navigation/patches/search_list_get_unique.diff index 650c481..7aae776 100644 --- a/src/navigation/patches/search_list_get_unique.diff +++ b/src/navigation/patches/search_list_get_unique.diff @@ -2,7 +2,7 @@ Index: navit/navit/search.c =================================================================== --- navit/navit/search.c (revision 5827) +++ navit/navit/search.c (working copy) -@@ -1043,3 +1043,138 @@ +@@ -1048,3 +1048,138 @@ search_init(void) { } diff --git a/src/navigation/script/README b/src/navigation/script/README index 890f3d4..21b1f97 100644 --- a/src/navigation/script/README +++ b/src/navigation/script/README @@ -1,4 +1,4 @@ -Release date of the file: 17-03-2015 +Release date of the file: 21-05-2015 Status: OK Project: @@ -25,48 +25,52 @@ See headers and LICENSE file Test target: Ubuntu 14.04 LTS -To build the code: - -To build the navigation middleware you need first to clone some additional stuff: -./build.sh clone - -Apply a patch (see below for a short history of upgrade) -cd ../navit +=============================== +Current versions of additional code +=============================== +<current version of positioning> (git): bf00492981d71fead8c0615fae59b73b03a4fbac +<current version of navit> (svn): 6084 + +=============================== +How to get additional code +=============================== +Get positioning: +git clone http://git.projects.genivi.org/lbs/positioning.git ./positioning +cd positioning +git checkout <current version of positioning> +cd ../ + +Get navit: +svn checkout http://svn.code.sf.net/p/navit/code/trunk navit -r <current version of navit> + +Now apply patches to navit (The r5549 removed the get_unique features used by GetSpell and the cmakelists needs to be modified): +cd navit patch -p0 -i ../patches/search_list_get_unique.diff -cd ../script - -So, build it: -./build.sh make - -And run: -./run +patch -p0 -i ../patches/cmake_current_source_dir_for_navit.diff +cd ../ -Annexe: +Get the sample map: +wget -O ./map/switzerland.bin.tmp http://www.navit-project.org/switzerland.bin +mv ./map/switzerland.bin.tmp ./map/switzerland.bin -Issues during upgrade of Navit: -The version has been upgraded from version r5532 to version r6025 +=============================== +How To Build +=============================== +(you're supposed to have got additional code before) -Note 1: There was an issue with the latest version of ksvg2png, that doesn't requires --output into the command line -The issue is fixed by the r5827 - -Note 2: The r5549 removed the get_unique features used by GetSpell -So, please apply the patch -patch -p0 -i ../patches/search_list_get_unique.diff - -Note 3: The r5822 removed the attribute distance_metric, it's fixed by the r5898 +Create and enter the build folder: +mkdir ./build +cd build +Build: +cmake ../ +make -CMakeLists.txt organization: +=============================== +How To Run +=============================== -src/navigation/CMakeLists.txt -To clone the sources located into different repositories -To get the map - -src/navigation/map/CMakeLists.txt +./run -For using the layer manager, you need to set the env variable and the paths: -source set-ilm-env.sh -To build with the layer manager: -./build.sh makelm diff --git a/src/navigation/script/set-env-ilm.sh b/src/navigation/script/set-env-ilm.sh deleted file mode 100755 index 362973e..0000000 --- a/src/navigation/script/set-env-ilm.sh +++ /dev/null @@ -1,17 +0,0 @@ -export WLD=$HOME/usrfs - -export QTVER=qt5 -export QTDIR=$WLD/$QTVER -export QT_PLUGIN_PATH=$QTDIR/lib/plugins - -export PATH=$QTDIR/bin:$WLD/bin:$PATH - -export LD_LIBRARY_PATH=$QTDIR/lib:$WLD/lib:/usr/lib/i386-linux-gnu - -export PKG_CONFIG_PATH=$QTDIR/lib/pkgconfig:$WLD/lib/pkgconfig:$WLD/share/pkgconfig:/usr/lib/i386-linux-gnu/pkgconfig - -export ACLOCAL_PATH=$WLD/share/aclocal -export ACLOCAL="aclocal -I $ACLOCAL_PATH" - - - diff --git a/src/navigation/script/toolchain.cmake b/src/navigation/script/toolchain.cmake deleted file mode 100644 index 9870df4..0000000 --- a/src/navigation/script/toolchain.cmake +++ /dev/null @@ -1,4 +0,0 @@ -add_definitions ("-g -O3") -set (CMAKE_FIND_ROOT_PATH ${WLD}/usrfs) -set (CMAKE_INSTALL_PREFIX ${WLD}/usrfs) - |