Merge pull request #334 from aleyush/check_pg_config

Check pg_config existance
This commit is contained in:
Brian C 2013-04-19 11:21:39 -07:00
commit c8c4a6d03d

View File

@ -2,11 +2,12 @@
'targets': [ 'targets': [
{ {
'target_name': 'binding', 'target_name': 'binding',
'sources': [
'src/binding.cc'
],
'conditions' : [ 'conditions' : [
['OS=="win"', { ['OS=="win"', {
'conditions' : [
['"<!@(cmd /C where /Q pg_config || echo n)"!="n"',
{
'sources': ['src/binding.cc'],
'include_dirs': ['<!@(pg_config --includedir)'], 'include_dirs': ['<!@(pg_config --includedir)'],
'libraries' : ['libpq.lib'], 'libraries' : ['libpq.lib'],
'msvs_settings': { 'msvs_settings': {
@ -16,9 +17,19 @@
] ]
}, },
} }
}
]
]
}, { # OS!="win" }, { # OS!="win"
'conditions' : [
['"y"!="n"', # ToDo: add pg_config existance condition that works on linux
{
'sources': ['src/binding.cc'],
'include_dirs': ['<!@(pg_config --includedir)'], 'include_dirs': ['<!@(pg_config --includedir)'],
'libraries' : ['-lpq -L<!@(pg_config --libdir)'] 'libraries' : ['-lpq -L<!@(pg_config --libdir)']
}
]
]
}] }]
] ]
} }