aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/node/binding.gyp
blob: fb4c779f8eb9e044dd0553deebdc405b8296ba8c (plain)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
  "variables" : {
    'no_install': "<!(echo $GRPC_NO_INSTALL)",
    'grpc_root': "<!(echo $GRPC_ROOT)",
    'grpc_lib_subdir': "<!(echo $GRPC_LIB_SUBDIR)"
    },
  "targets" : [
    {
      'include_dirs': [
        "<!(nodejs -e \"require('nan')\")"
      ],
      'cflags': [
        '-std=c++11',
        '-Wall',
        '-pthread',
        '-pedantic',
        '-g',
        '-zdefs'
        '-Werror'
      ],
      'ldflags': [
        '-g'
      ],
      'link_settings': {
        'libraries': [
          '-lrt',
          '-lpthread'
        ],
      },
      "target_name": "grpc",
      "sources": [
        "ext/byte_buffer.cc",
        "ext/call.cc",
        "ext/channel.cc",
        "ext/completion_queue_async_worker.cc",
        "ext/credentials.cc",
        "ext/node_grpc.cc",
        "ext/server.cc",
        "ext/server_credentials.cc",
        "ext/timeval.cc"
      ],
      'conditions' : [
        ['no_install=="yes"', {
          'include_dirs': [
            "<(grpc_root)/include"
          ],
          'link_settings': {
            'libraries': [
              '<(grpc_root)/<(grpc_lib_subdir)/libgrpc.a',
              '<(grpc_root)/<(grpc_lib_subdir)/libgpr.a'
            ]
          }
        }],
        ['no_install!="yes"', {
            'link_settings': {
              'libraries': [
                '-lgrpc',
                '-lgpr'
              ]
            }
          }]
      ]
    }
  ]
}