2012-06-19 11:41:48 +08:00
|
|
|
{
|
|
|
|
'targets': [
|
|
|
|
{
|
|
|
|
'target_name': 'binding',
|
2012-09-20 01:44:25 +08:00
|
|
|
'conditions' : [
|
2013-04-20 01:38:24 +08:00
|
|
|
['OS=="win"', {
|
|
|
|
'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"
|
|
|
|
'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)']
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
}]
|
2012-09-20 01:44:25 +08:00
|
|
|
]
|
2012-06-19 11:41:48 +08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|