forked from Blizzard/node-rdkafka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinding.gyp
98 lines (98 loc) · 2.48 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
{
"variables": {
# may be redefined in command line on configuration stage
"BUILD_LIBRDKAFKA%": "<!(echo ${BUILD_LIBRDKAFKA:-1})",
"WITH_SASL%": "<!(echo ${WITH_SASL:-1})",
"WITH_LZ4%": "<!(echo ${WITH_LZ4:-0})"
},
"targets": [
{
"target_name": "node-librdkafka",
"sources": [ "<!@(ls -1 src/*.cc)", ],
"include_dirs": [
"<!(node -e \"require('nan')\")",
"<(module_root_dir)/"
],
'conditions': [
[ "<(BUILD_LIBRDKAFKA)==1",
{
"dependencies": [
"<(module_root_dir)/deps/librdkafka.gyp:librdkafka_cpp"
],
"include_dirs": [ "deps/librdkafka/src-cpp" ],
},
# Else link against globally installed rdkafka and use
# globally installed headers. On Debian, you should
# install the librdkafka1, librdkafka++1, and librdkafka-dev
# .deb packages.
{
"libraries": ["-lrdkafka", "-lrdkafka++"],
"include_dirs": [
"/usr/include/librdkafka",
"/usr/local/include/librdkafka"
],
},
],
[
'OS=="linux"',
{
'cflags_cc' : [
'-std=c++11'
],
'cflags_cc!': [
'-fno-rtti'
]
}
],
[
'OS=="win"',
{
'cflags_cc' : [
'-std=c++11'
]
}
],
[
'OS=="mac"',
{
'xcode_settings': {
'MACOSX_DEPLOYMENT_TARGET': '10.11',
'GCC_ENABLE_CPP_RTTI': 'YES',
'OTHER_CPLUSPLUSFLAGS': [
'-std=c++11'
],
},
}
],
[ "<(WITH_SASL)==1",
{
'libraries' : ['-lsasl2'],
'conditions': [
[ 'OS=="mac"',
{
'xcode_settings': {
'libraries' : ['-lsasl2']
}
}
],
]
}
],
[ "<(WITH_LZ4)==1",
{
'libraries' : ['-llz4'],
'conditions': [
[ 'OS=="mac"',
{
'xcode_settings': {
'libraries' : ['-llz4']
}
}
],
]
}
]
]
}
]
}