Merge pull request #334 from aleyush/check_pg_config
Check pg_config existance
This commit is contained in:
commit
c8c4a6d03d
39
binding.gyp
39
binding.gyp
@ -2,23 +2,34 @@
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'binding',
|
||||
'sources': [
|
||||
'src/binding.cc'
|
||||
],
|
||||
'conditions' : [
|
||||
['OS=="win"', {
|
||||
'include_dirs': ['<!@(pg_config --includedir)'],
|
||||
'libraries' : ['libpq.lib'],
|
||||
'msvs_settings': {
|
||||
'VCLinkerTool' : {
|
||||
'AdditionalLibraryDirectories' : [
|
||||
'<!@(pg_config --libdir)\\'
|
||||
]
|
||||
},
|
||||
}
|
||||
'conditions' : [
|
||||
['"<!@(cmd /C where /Q pg_config || echo n)"!="n"',
|
||||
{
|
||||
'sources': ['src/binding.cc'],
|
||||
'include_dirs': ['<!@(pg_config --includedir)'],
|
||||
'libraries' : ['libpq.lib'],
|
||||
'msvs_settings': {
|
||||
'VCLinkerTool' : {
|
||||
'AdditionalLibraryDirectories' : [
|
||||
'<!@(pg_config --libdir)\\'
|
||||
]
|
||||
},
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}, { # OS!="win"
|
||||
'include_dirs': ['<!@(pg_config --includedir)'],
|
||||
'libraries' : ['-lpq -L<!@(pg_config --libdir)']
|
||||
'conditions' : [
|
||||
['"y"!="n"', # ToDo: add pg_config existance condition that works on linux
|
||||
{
|
||||
'sources': ['src/binding.cc'],
|
||||
'include_dirs': ['<!@(pg_config --includedir)'],
|
||||
'libraries' : ['-lpq -L<!@(pg_config --libdir)']
|
||||
}
|
||||
]
|
||||
]
|
||||
}]
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user