diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index c1a9e5667e..5bbd121e30 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -25,13 +25,14 @@ else() endif() find_package(Boost REQUIRED CONFIG COMPONENTS date_time iostreams thread) +find_package(LibArchive REQUIRED) link_directories(${LibOSRM_LIBRARY_DIRS}) add_executable(osrm-example example.cpp) find_package(LibOSRM REQUIRED) -set(LibOSRM_LINKABLE_LIBRARIES ${LibOSRM_LIBRARIES} ${LibOSRM_DEPENDENT_LIBRARIES}) +set(LibOSRM_LINKABLE_LIBRARIES ${LibOSRM_LIBRARIES} ${LibOSRM_DEPENDENT_LIBRARIES} LibArchive::LibArchive) list(REMOVE_DUPLICATES LibOSRM_LINKABLE_LIBRARIES) target_link_libraries(osrm-example ${LibOSRM_LINKABLE_LIBRARIES}) include_directories(SYSTEM ${LibOSRM_INCLUDE_DIRS}) diff --git a/example/README.md b/example/README.md index 50ef83796c..8199058b8a 100644 --- a/example/README.md +++ b/example/README.md @@ -23,14 +23,14 @@ cd example/ mkdir build && cd build/ cmake .. cmake --build . -./osrm-example ../test/data/mld/monaco.osrm +./osrm-example ../../test/data/mld/monaco.osrm ``` The expected output is the distance and duration of the route set in the `example.cpp`. ### `example.js` -To run this module in Node.js you need to install [node-cmake](https://www.npmjs.com/package/node-cmake) in the project's repo root level and pass the flag `-DENABLE_NODE_BINDINGS=On` when building the main project. +To run this module in Node.js you need to pass the flag `-DENABLE_NODE_BINDINGS=On` when building the main project. Refer to the sub-section on preparing test data for the application in this document. @@ -48,7 +48,7 @@ You can reliably change the thread pool size of the process by setting the `UV_T UV_THREADPOOL_SIZE=16 node example.js ``` -See https://nodejs.org/docs/latest-v18.x/api/os.html#osavailableparallelism for more info. +See https://nodejs.org/docs/latest-v20.x/api/os.html#osavailableparallelism for more info. Then you can test it with: