forked from giraldeau/evnav
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update to OSRM 5.18 * Fix build dependencies Signed-off-by: Francis Giraldeau <[email protected]>
- Loading branch information
Showing
21 changed files
with
129 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[submodule "3rdparty/qhttp"] | ||
path = 3rdparty/qhttp | ||
url = https://github.com/giraldeau/qhttp.git | ||
[submodule "3rdparty/rapidjson"] | ||
path = 3rdparty/rapidjson | ||
url = https://github.com/miloyip/rapidjson |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
add_subdirectory(qhttp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
|
||
project(EvNav) | ||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") | ||
|
||
set(CMAKE_CXX_STANDARD 14) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(THREADS_PREFER_PTHREAD_FLAG ON) | ||
set(CMAKE_DISABLE_SOURCE_CHANGES ON) | ||
set(CMAKE_AUTOMOC ON) | ||
|
||
include(GNUInstallDirs) | ||
find_package(Threads REQUIRED) | ||
find_package(Qt5 COMPONENTS Core Network Test REQUIRED) | ||
find_package(LibOSRM REQUIRED) | ||
link_directories(${LibOSRM_LIBRARY_DIRS}) | ||
|
||
enable_testing() | ||
|
||
add_subdirectory(3rdparty) | ||
add_subdirectory(libevnav) | ||
add_subdirectory(evnav-srv) | ||
add_subdirectory(evnav-cli) | ||
add_subdirectory(example) | ||
add_subdirectory(tests) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# - Try to find LibOSRM | ||
# Once done this will define | ||
# LibOSRM_FOUND - System has LibOSRM | ||
# LibOSRM_LIBRARIES - The libraries and ldflags needed to use LibOSRM | ||
# LibOSRM_DEPENDENT_LIBRARIES - The libraries and ldflags need to link LibOSRM dependencies | ||
# LibOSRM_LIBRARY_DIRS - The libraries paths needed to find LibOSRM | ||
# LibOSRM_CXXFLAGS - Compiler switches required for using LibOSRM | ||
|
||
find_package(PkgConfig) | ||
pkg_search_module(PC_LibOSRM QUIET libosrm) | ||
|
||
function(JOIN VALUES GLUE OUTPUT) | ||
string (REPLACE ";" "${GLUE}" _TMP_STR "${VALUES}") | ||
set (${OUTPUT} "${_TMP_STR}" PARENT_SCOPE) | ||
endfunction() | ||
|
||
list(REMOVE_ITEM PC_LibOSRM_CFLAGS " ") | ||
JOIN("${PC_LibOSRM_CFLAGS}" " " output) | ||
|
||
set(LibOSRM_CXXFLAGS ${output}) | ||
set(LibOSRM_LIBRARY_DIRS ${PC_LibOSRM_LIBRARY_DIRS}) | ||
|
||
find_path(LibOSRM_INCLUDE_DIR osrm/osrm.hpp | ||
PATH_SUFFIXES osrm include/osrm include | ||
HINTS ${PC_LibOSRM_INCLUDEDIR} ${PC_LibOSRM_INCLUDE_DIRS} | ||
~/Library/Frameworks | ||
/Library/Frameworks | ||
/usr/local | ||
/usr | ||
/opt/local | ||
/opt) | ||
|
||
find_library(TEST_LibOSRM_STATIC_LIBRARY Names osrm.lib libosrm.a | ||
PATH_SUFFIXES osrm lib/osrm lib | ||
HINTS ${PC_LibOSRM_LIBDIR} ${PC_LibOSRM_LIBRARY_DIRS} | ||
~/Library/Frameworks | ||
/Library/Frameworks | ||
/usr/local | ||
/usr | ||
/opt/local | ||
/opt) | ||
find_library(TEST_LibOSRM_DYNAMIC_LIBRARY Names libosrm.dylib libosrm.so | ||
PATH_SUFFIXES osrm lib/osrm lib | ||
HINTS ${PC_LibOSRM_LIBDIR} ${PC_LibOSRM_LIBRARY_DIRS} | ||
~/Library/Frameworks | ||
/Library/Frameworks | ||
/usr/local | ||
/usr | ||
/opt/local | ||
/opt) | ||
|
||
set(LibOSRM_DEPENDENT_LIBRARIES ${PC_LibOSRM_STATIC_LDFLAGS}) | ||
set(LibOSRM_LIBRARIES ${PC_LibOSRM_LDFLAGS}) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
# handle the QUIETLY and REQUIRED arguments and set LIBOSRM_FOUND to TRUE | ||
# if all listed variables are TRUE | ||
find_package_handle_standard_args(LibOSRM DEFAULT_MSG | ||
LibOSRM_LIBRARY_DIRS | ||
LibOSRM_CXXFLAGS | ||
LibOSRM_LIBRARIES | ||
LibOSRM_DEPENDENT_LIBRARIES | ||
LibOSRM_INCLUDE_DIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
add_executable(evnav-cli main.cpp) | ||
target_link_libraries(evnav-cli evnavcore) | ||
install(TARGETS evnav-cli DESTINATION bin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
add_executable(evnav-srv main.cpp) | ||
target_link_libraries(evnav-srv evnavcore) | ||
install(TARGETS evnav-srv DESTINATION bin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
add_executable(minievnav main.cpp) | ||
target_link_libraries(minievnav evnavcore) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
file(GLOB EVNAVCORE_SOURCES "*.cpp" "*.h") | ||
|
||
add_library(evnavcore ${EVNAVCORE_SOURCES}) | ||
target_link_libraries(evnavcore PUBLIC Qt5::Core qhttp Threads::Threads ${LibOSRM_LIBRARIES} ${LibOSRM_DEPENDENT_LIBRARIES}) | ||
target_include_directories(evnavcore PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${LibOSRM_INCLUDE_DIR} "${LibOSRM_INCLUDE_DIR}/osrm") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LibOSRM_CXXFLAGS}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
add_subdirectory(graph) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
add_executable(tst_graphtest tst_graphtest.cpp) | ||
target_link_libraries(tst_graphtest evnavcore Qt5::Test) | ||
#target_include_directories(tst_graphtest PRIVATE "${LibOSRM_INCLUDE_DIRS}") | ||
target_compile_definitions(tst_graphtest PRIVATE TOPSRCDIR="${CMAKE_SOURCE_DIR}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters