Second try: this should work multiplatform.
This commit is contained in:
parent
528c608a20
commit
552a844565
50
binding.gyp
50
binding.gyp
@ -3,28 +3,34 @@
|
|||||||
{
|
{
|
||||||
'target_name': 'binding',
|
'target_name': 'binding',
|
||||||
'conditions' : [
|
'conditions' : [
|
||||||
['OS=="win" and "<!@(cmd /C where /Q pg_config || echo n)"!="n"',
|
['OS=="win"', {
|
||||||
{
|
'conditions' : [
|
||||||
'sources': ['src/binding.cc'],
|
['"<!@(cmd /C where /Q pg_config || echo n)"!="n"',
|
||||||
'include_dirs': ['<!@(pg_config --includedir)'],
|
{
|
||||||
'libraries' : ['libpq.lib'],
|
'sources': ['src/binding.cc'],
|
||||||
'msvs_settings': {
|
'include_dirs': ['<!@(pg_config --includedir)'],
|
||||||
'VCLinkerTool' : {
|
'libraries' : ['libpq.lib'],
|
||||||
'AdditionalLibraryDirectories' : [
|
'msvs_settings': {
|
||||||
'<!@(pg_config --libdir)\\'
|
'VCLinkerTool' : {
|
||||||
]
|
'AdditionalLibraryDirectories' : [
|
||||||
},
|
'<!@(pg_config --libdir)\\'
|
||||||
}
|
]
|
||||||
}
|
},
|
||||||
],
|
}
|
||||||
|
}
|
||||||
['OS!="win"',
|
]
|
||||||
{
|
]
|
||||||
'sources': ['src/binding.cc'],
|
}, { # OS!="win"
|
||||||
'include_dirs': ['<!@(pg_config --includedir)'],
|
'conditions' : [
|
||||||
'libraries' : ['-lpq -L<!@(pg_config --libdir)']
|
['"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