Skip to content
This repository was archived by the owner on Jun 8, 2024. It is now read-only.

Commit

Permalink
start building against installed osrm
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Dec 18, 2013
1 parent fb82bc6 commit f38840d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,25 @@ before building `node-osrm`.

# Building

To build the bindings you need to build both `Project-OSRM` and `node-osrm` together:
To build the bindings you need to first build and **install** the `develop` branch of `Project-OSRM`:

# grab develop branch
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
sudo make install
cd ../node-osrm
npm install

So, the `Project-OSRM` checkout and `node-osrm` checkout must both sit at the same directory level.
NOTE: If you hit problems building Project-OSRM see [the wiki](https://github.com/DennisOSRM/Project-OSRM/wiki/Building%20OSRM) for details.

Then build `node-osrm` against `Project-OSRM` installed in `/usr/local`:

git clone https://github.com/DennisOSRM/node-osrm.git
cd node-osrm
npm install

If you hit problems building Project-OSRM see [the wiki](https://github.com/DennisOSRM/Project-OSRM/wiki/Building%20OSRM) for details.

# Testing

Expand Down
8 changes: 4 additions & 4 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
'includes': [ 'common.gypi' ],
'variables': {
'osrm%':'<!(pwd)/../Project-OSRM',
'osrm%':'/usr/local/',
"module_name":"osrm",
"module_path":"./lib/",
'cwd%':'<!(pwd)',
Expand All @@ -12,17 +12,17 @@
{
'target_name': '<(module_name)',
'include_dirs': [
'<@(osrm)/Library',
'<@(osrm)/include/osrm',
'./src/'
],
'libraries': [
'-L<@(osrm)/build',
'-L<@(osrm)/lib',
'-lOSRM'
],
'conditions': [
[ 'OS=="linux"', {
'libraries+':[
'-Wl,-rpath=<@(osrm)/build',
'-Wl,-rpath=<@(osrm)/lib',
'-lboost_program_options',
'-lboost_regex'
]}
Expand Down

0 comments on commit f38840d

Please sign in to comment.