forked from brianc/node-libpq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
binding.gyp
42 lines (42 loc) · 1.03 KB
/
binding.gyp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
'targets': [
{
'target_name': 'addon',
'sources': [
'src/connection.cc',
'src/connect-async-worker.cc',
'src/addon.cc'
],
'include_dirs': [
'<!@(pg_config --includedir)',
'<!(node -e "require(\'nan\')")'
],
'conditions' : [
['OS=="win"', {
'conditions' : [
['"<!@(cmd /C where /Q pg_config || echo n)"!="n"',
{
'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
{
'libraries' : ['-lpq -L<!@(pg_config --libdir)']
}
]
]
}]
]
}
]
}