This repository has been archived by the owner on Jan 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
binding.gyp
102 lines (102 loc) · 2.64 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{
"targets": [
{
"target_name": "kafka-native",
"sources": [
"src/kafka-native.cc",
"src/common.cc",
"src/producer.cc",
"src/consumer.cc"
],
'dependencies': [
'librdkafka'
],
"include_dirs": [
"<!(node -e \"require('nan')\")",
"deps/librdkafka/src"
],
'conditions': [
[
'OS=="mac"',
{
'xcode_settings': {
'MACOSX_DEPLOYMENT_TARGET': '10.11'
},
'libraries' : ['-lz']
}
],[
'OS=="linux" and gcc_version<=46',
{
'cflags': ['-std=c++0x','-g'],
'libraries' : ['-lz']
}
],[
'OS=="linux" and gcc_version>46',
{
'cflags': ['-std=c++11','-g'],
'libraries' : ['-lz']
}
]
]
},
{
"target_name": "librdkafka_config_h",
"type": "none",
"actions": [
{
'action_name': 'configure_librdkafka',
'message': 'configuring librdkafka...',
'inputs': [
'deps/librdkafka/configure',
],
'outputs': [
'deps/librdkafka/config.h',
],
'action': ['eval', 'cd deps/librdkafka && ./configure'],
},
],
},
{
"target_name": "librdkafka",
"type": "static_library",
'dependencies': [
'librdkafka_config_h',
],
"sources": [
"deps/librdkafka/src/rd.c",
"deps/librdkafka/src/rdaddr.c",
"deps/librdkafka/src/rdcrc32.c",
"deps/librdkafka/src/rdgz.c",
"deps/librdkafka/src/rdkafka.c",
"deps/librdkafka/src/rdkafka_broker.c",
"deps/librdkafka/src/rdkafka_defaultconf.c",
"deps/librdkafka/src/rdkafka_msg.c",
"deps/librdkafka/src/rdkafka_offset.c",
"deps/librdkafka/src/rdkafka_timer.c",
"deps/librdkafka/src/rdkafka_topic.c",
"deps/librdkafka/src/rdlog.c",
"deps/librdkafka/src/rdqueue.c",
"deps/librdkafka/src/rdrand.c",
"deps/librdkafka/src/rdthread.c",
"deps/librdkafka/src/snappy.c"
],
'conditions': [
[
'OS=="mac"',
{
'xcode_settings': {
'MACOSX_DEPLOYMENT_TARGET': '10.11',
'OTHER_CFLAGS' : ['-Wno-sign-compare', '-Wno-missing-field-initializers'],
},
'libraries' : ['-lz']
}
],[
'OS=="linux"',
{
'cflags' : [ '-Wno-sign-compare', '-Wno-missing-field-initializers', '-Wno-empty-body', '-g'],
}
]
]
}
]
}