1{
2  'targets': [{
3    'target_name': 'couchbase_impl',
4    'variables': {
5      'couchbase_root%': ''
6    },
7    'defines': [
8      'LCBUV_EMBEDDED_SOURCE',
9      'LCB_TRACING'
10    ],
11    'conditions': [
12      [ 'couchbase_root==""', {
13        'defines': [
14          'LIBCOUCHBASE_STATIC'
15        ],
16        'dependencies': [
17          'deps/lcb/libcouchbase.gyp:couchbase'
18        ]
19      }, {
20        'conditions': [
21          [ 'OS=="win"', {
22            'include_dirs': [
23              '<(couchbase_root)/include/'
24            ],
25            'link_settings': {
26              'libraries': [
27                '-l<(couchbase_root)/lib/libcouchbase.lib'
28              ]
29            },
30            'copies': [
31              {
32                'files': [ '<(couchbase_root)/bin/libcouchbase.dll' ],
33                'destination': '<(module_root_dir)/build/Release/'
34              },{
35                'files': [ '<(couchbase_root)/bin/libcouchbase.dll' ],
36                'destination': '<(module_root_dir)/build/Debug/'
37              }
38            ],
39          }, {
40            'link_settings': {
41              'libraries': [
42                '-lcouchbase',
43              ],
44            },
45            'include_dirs': [ '<(couchbase_root)/include' ],
46            'libraries+': [ '-L<(couchbase_root)/lib' ],
47            'conditions': [ [ 'OS!="mac"', {'libraries+':['-Wl,-rpath=<(couchbase_root)/lib']} ] ]
48          }]
49        ]
50      }],
51      ['OS!="win"', {
52        'link_settings': {
53          'libraries': [
54            '$(EXTRA_LDFLAGS)'
55          ],
56        },
57        'cflags': [
58          '-g',
59          '-fPIC',
60          '-Wall',
61          '-Wextra',
62          '$(EXTRA_CFLAGS)',
63          '$(EXTRA_CPPFLAGS)',
64          '$(EXTRA_CXXFLAGS)',
65        ],
66        'cflags_c':[
67          '-pedantic',
68          '-std=gnu99',
69        ]
70      }]
71    ],
72    'sources': [
73      'src/binding.cpp',
74      'src/cas.cpp',
75      'src/connection_callbacks.cpp',
76      'src/connection_ops.cpp',
77      'src/connection.cpp',
78      'src/constants.cpp',
79      'src/error.cpp',
80      'src/lcbx.cpp',
81      'src/logger.cpp',
82      'src/mutationtoken.cpp',
83      'src/opbuilder.cpp',
84      'src/uv-plugin-all.cpp'
85    ],
86    'include_dirs': [
87      '<!(node -e "require(\'nan\')")'
88    ]
89  }]
90}
91