|
3 | 3 | {
|
4 | 4 | 'target_name': 'binding',
|
5 | 5 | 'conditions' : [
|
6 |
| - ['OS=="win" and "<!@(cmd /C where /Q pg_config || echo n)"!="n"', |
7 |
| - { |
8 |
| - 'sources': ['src/binding.cc'], |
9 |
| - 'include_dirs': ['<!@(pg_config --includedir)'], |
10 |
| - 'libraries' : ['libpq.lib'], |
11 |
| - 'msvs_settings': { |
12 |
| - 'VCLinkerTool' : { |
13 |
| - 'AdditionalLibraryDirectories' : [ |
14 |
| - '<!@(pg_config --libdir)\\' |
15 |
| - ] |
16 |
| - }, |
17 |
| - } |
18 |
| - } |
19 |
| - ], |
20 |
| - |
21 |
| - ['OS!="win"', |
22 |
| - { |
23 |
| - 'sources': ['src/binding.cc'], |
24 |
| - 'include_dirs': ['<!@(pg_config --includedir)'], |
25 |
| - 'libraries' : ['-lpq -L<!@(pg_config --libdir)'] |
26 |
| - } |
27 |
| - ] |
| 6 | + ['OS=="win"', { |
| 7 | + 'conditions' : [ |
| 8 | + ['"<!@(cmd /C where /Q pg_config || echo n)"!="n"', |
| 9 | + { |
| 10 | + 'sources': ['src/binding.cc'], |
| 11 | + 'include_dirs': ['<!@(pg_config --includedir)'], |
| 12 | + 'libraries' : ['libpq.lib'], |
| 13 | + 'msvs_settings': { |
| 14 | + 'VCLinkerTool' : { |
| 15 | + 'AdditionalLibraryDirectories' : [ |
| 16 | + '<!@(pg_config --libdir)\\' |
| 17 | + ] |
| 18 | + }, |
| 19 | + } |
| 20 | + } |
| 21 | + ] |
| 22 | + ] |
| 23 | + }, { # OS!="win" |
| 24 | + 'conditions' : [ |
| 25 | + ['"y"!="n"', # ToDo: add pg_config existance condition that works on linux |
| 26 | + { |
| 27 | + 'sources': ['src/binding.cc'], |
| 28 | + 'include_dirs': ['<!@(pg_config --includedir)'], |
| 29 | + 'libraries' : ['-lpq -L<!@(pg_config --libdir)'] |
| 30 | + } |
| 31 | + ] |
| 32 | + ] |
| 33 | + }] |
28 | 34 | ]
|
29 | 35 | }
|
30 | 36 | ]
|
|
0 commit comments