mirror of
https://github.com/brianc/node-postgres.git
synced 2025-12-08 20:16:25 +00:00
Check if pg_config exists on windows.
This commit is contained in:
parent
d51994c646
commit
528c608a20
37
binding.gyp
37
binding.gyp
@ -2,24 +2,29 @@
|
||||
'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)\\'
|
||||
]
|
||||
},
|
||||
['OS=="win" and "<!@(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)']
|
||||
}]
|
||||
],
|
||||
|
||||
['OS!="win"',
|
||||
{
|
||||
'sources': ['src/binding.cc'],
|
||||
'include_dirs': ['<!@(pg_config --includedir)'],
|
||||
'libraries' : ['-lpq -L<!@(pg_config --libdir)']
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user