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

depend fully on pkg-config #28

Merged
merged 7 commits into from
Jan 8, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ install:

before_script:
- npm install mocha
- npm install
- pkg-config libosrm --cflags
- pkg-config libosrm --libs
- pkg-config libosrm --libs --static
- cat /usr/local/lib/pkgconfig/*
- npm install --verbose

script:
- make test
17 changes: 5 additions & 12 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -1,39 +1,32 @@
{
'includes': [ 'common.gypi' ],
'variables': {
'osrm%':'/usr/local/',
"module_name":"osrm",
"module_path":"./lib/",
'cwd%':'<!(pwd)',
'std%':'ansi',
'runtime_link%':'static'
},
'targets': [
{
'target_name': '<(module_name)',
'include_dirs': [
'<@(osrm)/include/',
'<!@(pkg-config libosrm --cflags)',
'./src/'
],
'libraries': [
'-L<@(osrm)/lib',
'-lOSRM'
'<!@(pkg-config libosrm --libs)'
],
'conditions': [
[ 'OS=="linux"', {
'libraries+':[
'-Wl,-rpath=<@(osrm)/lib',
'libraries':[
'-Wl,-rpath=<!@(pkg-config libosrm --variable=prefix)/lib',
'-lboost_program_options',
'-lboost_regex'
]}
],
['runtime_link == "static"', {
'libraries': [
'-lboost_program_options',
'-lboost_regex',
'-lboost_thread',
'-lboost_system',
'-lboost_filesystem'
'<!@(pkg-config libosrm --libs --static)'
]
}],
['std == "c++11"', {
Expand Down