14f5c019fSRod Vagg{
24f5c019fSRod Vagg  'targets': [{
34f5c019fSRod Vagg    'target_name': 'couchbase_impl',
44f5c019fSRod Vagg    'conditions': [
54f5c019fSRod Vagg      [ 'OS=="win"', {
64f5c019fSRod Vagg        'variables': {
74f5c019fSRod Vagg          'couchbase_root%': 'C:/couchbase'
84f5c019fSRod Vagg        },
94f5c019fSRod Vagg        'include_dirs': [
104f5c019fSRod Vagg          '<(couchbase_root)/include/',
114f5c019fSRod Vagg        ],
124f5c019fSRod Vagg        'link_settings': {
134f5c019fSRod Vagg          'libraries': [
144f5c019fSRod Vagg            '-l<(couchbase_root)/lib/libcouchbase.lib',
154f5c019fSRod Vagg          ],
164f5c019fSRod Vagg        },
174f5c019fSRod Vagg        'copies': [{
184f5c019fSRod Vagg          'files': [ '<(couchbase_root)/lib/libcouchbase.dll' ],
194f5c019fSRod Vagg          'destination': '<(module_root_dir)/build/Release/',
204f5c019fSRod Vagg        },],
214f5c019fSRod Vagg        'configurations': {
224f5c019fSRod Vagg          'Release': {
234f5c019fSRod Vagg            'msvs_settings': {
244f5c019fSRod Vagg              'VCCLCompilerTool': {
254f5c019fSRod Vagg                'ExceptionHandling': '2',
264f5c019fSRod Vagg                'RuntimeLibrary': 0,
274f5c019fSRod Vagg              },
284f5c019fSRod Vagg            },
294f5c019fSRod Vagg          },
304f5c019fSRod Vagg        },
314f5c019fSRod Vagg      }],
324f5c019fSRod Vagg      ['OS=="mac"', {
334f5c019fSRod Vagg        'xcode_settings': {
344f5c019fSRod Vagg          'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
354f5c019fSRod Vagg        },
364f5c019fSRod Vagg      }],
374f5c019fSRod Vagg      ['OS!="win"', {
384f5c019fSRod Vagg        'link_settings': {
394f5c019fSRod Vagg          'libraries': [
404f5c019fSRod Vagg            '$(EXTRA_LDFLAGS)',
414f5c019fSRod Vagg            '-lcouchbase',
424f5c019fSRod Vagg          ],
434f5c019fSRod Vagg        },
444f5c019fSRod Vagg        'cflags': [
454f5c019fSRod Vagg          '-g',
464f5c019fSRod Vagg          '-fPIC',
47c199f46aSTrond Norbye          '-Wall',
48c199f46aSTrond Norbye          '-Wextra',
494f5c019fSRod Vagg          '-Wno-unused-variable',
504f5c019fSRod Vagg          '-Wno-unused-function',
514f5c019fSRod Vagg          '$(EXTRA_CFLAGS)',
524f5c019fSRod Vagg          '$(EXTRA_CPPFLAGS)',
534f5c019fSRod Vagg          '$(EXTRA_CXXFLAGS)',
544f5c019fSRod Vagg        ],
55c199f46aSTrond Norbye        'cflags_c':[
56c199f46aSTrond Norbye          '-pedantic',
57c199f46aSTrond Norbye          '-std=gnu99',
58c199f46aSTrond Norbye        ],
594f5c019fSRod Vagg        'cflags!': [
604f5c019fSRod Vagg          '-fno-exceptions',
614f5c019fSRod Vagg        ],
624f5c019fSRod Vagg        'cflags_cc!': [
634f5c019fSRod Vagg          '-fno-exceptions',
644f5c019fSRod Vagg        ],
654f5c019fSRod Vagg      }],
664f5c019fSRod Vagg    ],
674f5c019fSRod Vagg    'sources': [
684f5c019fSRod Vagg      'src/args.cc',
694f5c019fSRod Vagg      'src/couchbase_impl.cc',
704f5c019fSRod Vagg      'src/namemap.cc',
714f5c019fSRod Vagg      'src/notify.cc',
724f5c019fSRod Vagg      'src/operations.cc',
734f5c019fSRod Vagg      'src/cas.cc',
744f5c019fSRod Vagg      'io/common.c',
754f5c019fSRod Vagg      'io/socket.c',
764f5c019fSRod Vagg      'io/read.c',
774f5c019fSRod Vagg      'io/write.c',
784f5c019fSRod Vagg      'io/timer.c',
794f5c019fSRod Vagg      'io/plugin-libuv.c',
804f5c019fSRod Vagg      'io/util/lcb_luv_yolog.c',
814f5c019fSRod Vagg      'io/util/hexdump.c',
824f5c019fSRod Vagg    ],
834f5c019fSRod Vagg    'include_dirs': [
844f5c019fSRod Vagg      './',
854f5c019fSRod Vagg    ],
864f5c019fSRod Vagg  }]
874f5c019fSRod Vagg}
88