Node.js bindings to the OSRM.
-
OSRM
develop
branch, cloned from github. -
OSRM build with
-DWITH_TOOLS=1
so thatlibOSRM
is created -
Lua, luabind, and stxxl headers
-
Boost >= 1.50 or Luabind headers patched as in Project-OSRM/osrm-backend#465 (comment) (note: it is possible to patch the luabind headers that are installed by apt)
-
If you use luajit then you may need to put the luajit headers on the compile flags like:
export CXXFLAGS="-I/usr/include/luajit-2.0/"
To build with OS X Mavericks you need to ensure the bindings like to libc++
. An easy way to do this is to set:
export CXXFLAGS=-mmacosx-version-min=10.9
before building node-OSRM
.
To build the bindings you need to build both Project-OSRM
and node-OSRM
together:
git clone -b develop https://github.com/DennisOSRM/Project-OSRM.git
git clone https://github.com/DennisOSRM/node-OSRM.git
cd Project-OSRM
mkdir build;
cd build;
cmake ../ -DWITH_TOOLS=1
make
cd ../node-OSRM
npm install
So, the Project-OSRM
checkout and node-OSRM
checkout must both sit at the same directory level.
Run the tests like:
make test