forked from Blizzard/node-rdkafka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinding.gyp
102 lines (102 loc) · 2.91 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
{
"variables": {
# may be redefined in command line on configuration stage
# "BUILD_LIBRDKAFKA%": "<!(echo ${BUILD_LIBRDKAFKA:-1})"
"BUILD_LIBRDKAFKA%": "<!(node ./util/get-env.js BUILD_LIBRDKAFKA 1)"
},
"targets": [
{
"target_name": "node-librdkafka",
'sources': [
'src/binding.cc',
'src/callbacks.cc',
'src/common.cc',
'src/config.cc',
'src/connection.cc',
'src/errors.cc',
'src/kafka-consumer.cc',
'src/producer.cc',
'src/topic.cc',
'src/workers.cc'
],
"include_dirs": [
"<!(node -e \"require('nan')\")",
"<(module_root_dir)/"
],
'conditions': [
[
'OS=="win"',
{
'cflags_cc' : [
'-std=c++11'
],
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': [
'/GR'
],
'AdditionalUsingDirectories': [
'<(module_root_dir)/deps/librdkafka/win32/outdir/v120/x64/Release/'
]
}
},
'msvs_version': '2013',
'msbuild_toolset': 'v120',
"dependencies": [
"<(module_root_dir)/deps/librdkafka.gyp:librdkafkacpp"
],
'include_dirs': [
'deps/librdkafka/src-cpp'
]
},
{
'conditions': [
[ "<(BUILD_LIBRDKAFKA)==1",
{
"dependencies": [
"<(module_root_dir)/deps/librdkafka.gyp:librdkafkacpp"
],
"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=="mac"',
{
'xcode_settings': {
'MACOSX_DEPLOYMENT_TARGET': '10.11',
'GCC_ENABLE_CPP_RTTI': 'YES',
'OTHER_CPLUSPLUSFLAGS': [
'-std=c++11'
],
},
}
]
]
}
]
]
}
]
}