Skip to content

Commit

Permalink
Add conditions to the binding.gyp for windows, linux, mac.
Browse files Browse the repository at this point in the history
  • Loading branch information
booo committed Sep 26, 2012
1 parent 7826e49 commit 4cb66d1
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,27 @@
'sources': [
'src/binding.cc'
],
'include_dirs': ['<!@(pg_config --includedir)'],
'libraries' : ['-lpq -L<!@(pg_config --libdir)']
'conditions' : [
['OS=="mac"', {
'include_dirs': ['<!@(pg_config --includedir)'],
'libraries' : ['-lpq -L<!@(pg_config --libdir)']
}],
['OS=="linux"', {
'include_dirs': ['<!@(pg_config --includedir)'],
'libraries' : ['-lpq -L<!@(pg_config --libdir)']
}],
['OS=="win"', {
'include_dirs': ['<!@(pg_config --includedir)'],
'libraries' : ['libpq.dll'],
'msvs_settings': {
'VCLinkerTool' : {
'AdditionalLibraryDirectories' : [
'<!@(pg_config --libdir)\\'
]
},
}
}]
]
}
]
}

0 comments on commit 4cb66d1

Please sign in to comment.