|
1 | 1 | {
|
2 | 2 | "variables": {
|
3 | 3 | # may be redefined in command line on configuration stage
|
4 |
| - "BUILD_LIBRDKAFKA%": "<!(echo ${BUILD_LIBRDKAFKA:-1})", |
5 |
| - "WITH_SASL%": "<!(echo ${WITH_SASL:-1})", |
6 |
| - "WITH_LZ4%": "<!(echo ${WITH_LZ4:-0})" |
| 4 | + # "build_librdkafka%": "<!(echo ${BUILD_LIBRDKAFKA:-1})" |
| 5 | + "build_librdkafka%": "1" |
7 | 6 | },
|
8 | 7 | "targets": [
|
9 | 8 | {
|
10 | 9 | "target_name": "node-librdkafka",
|
11 |
| - "sources": [ "<!@(ls -1 src/*.cc)", ], |
| 10 | + 'sources': [ |
| 11 | + 'src/binding.cc', |
| 12 | + 'src/callbacks.cc', |
| 13 | + 'src/common.cc', |
| 14 | + 'src/config.cc', |
| 15 | + 'src/connection.cc', |
| 16 | + 'src/errors.cc', |
| 17 | + 'src/kafka-consumer.cc', |
| 18 | + 'src/producer.cc', |
| 19 | + 'src/topic.cc', |
| 20 | + 'src/workers.cc' |
| 21 | + ], |
12 | 22 | "include_dirs": [
|
13 | 23 | "<!(node -e \"require('nan')\")",
|
14 | 24 | "<(module_root_dir)/"
|
15 | 25 | ],
|
16 | 26 | 'conditions': [
|
17 |
| - [ "<(BUILD_LIBRDKAFKA)==1", |
18 |
| - { |
19 |
| - "dependencies": [ |
20 |
| - "<(module_root_dir)/deps/librdkafka.gyp:librdkafka_cpp" |
21 |
| - ], |
22 |
| - "include_dirs": [ "deps/librdkafka/src-cpp" ], |
23 |
| - }, |
24 |
| - # Else link against globally installed rdkafka and use |
25 |
| - # globally installed headers. On Debian, you should |
26 |
| - # install the librdkafka1, librdkafka++1, and librdkafka-dev |
27 |
| - # .deb packages. |
28 |
| - { |
29 |
| - "libraries": ["-lrdkafka", "-lrdkafka++"], |
30 |
| - "include_dirs": [ |
31 |
| - "/usr/include/librdkafka", |
32 |
| - "/usr/local/include/librdkafka" |
33 |
| - ], |
34 |
| - }, |
35 |
| - ], |
36 |
| - [ |
37 |
| - 'OS=="linux"', |
38 |
| - { |
39 |
| - 'cflags_cc' : [ |
40 |
| - '-std=c++11' |
41 |
| - ], |
42 |
| - 'cflags_cc!': [ |
43 |
| - '-fno-rtti' |
44 |
| - ] |
45 |
| - } |
46 |
| - ], |
47 | 27 | [
|
48 | 28 | 'OS=="win"',
|
49 | 29 | {
|
50 | 30 | 'cflags_cc' : [
|
51 | 31 | '-std=c++11'
|
52 |
| - ] |
53 |
| - } |
54 |
| - ], |
55 |
| - [ |
56 |
| - 'OS=="mac"', |
57 |
| - { |
58 |
| - 'xcode_settings': { |
59 |
| - 'MACOSX_DEPLOYMENT_TARGET': '10.11', |
60 |
| - 'GCC_ENABLE_CPP_RTTI': 'YES', |
61 |
| - 'OTHER_CPLUSPLUSFLAGS': [ |
62 |
| - '-std=c++11' |
63 |
| - ], |
| 32 | + ], |
| 33 | + 'msvs_settings': { |
| 34 | + 'VCCLCompilerTool': { |
| 35 | + 'AdditionalOptions': [ |
| 36 | + '/GR' |
| 37 | + ], |
| 38 | + 'AdditionalUsingDirectories': [ |
| 39 | + '<(module_root_dir)/deps/librdkafka/win32/outdir/v120/x64/Release/' |
| 40 | + ] |
| 41 | + } |
64 | 42 | },
|
65 |
| - } |
66 |
| - ], |
67 |
| - [ "<(WITH_SASL)==1", |
| 43 | + 'msvs_version': '2013', |
| 44 | + 'msbuild_toolset': 'v120', |
| 45 | + "dependencies": [ |
| 46 | + "<(module_root_dir)/deps/librdkafka.gyp:librdkafkacpp" |
| 47 | + ], |
| 48 | + 'include_dirs': [ |
| 49 | + 'deps/librdkafka/src-cpp' |
| 50 | + ] |
| 51 | + }, |
68 | 52 | {
|
69 |
| - 'libraries' : ['-lsasl2'], |
70 | 53 | 'conditions': [
|
71 |
| - [ 'OS=="mac"', |
| 54 | + [ "<(build_librdkafka)==1", |
72 | 55 | {
|
73 |
| - 'xcode_settings': { |
74 |
| - 'libraries' : ['-lsasl2'] |
75 |
| - } |
| 56 | + "dependencies": [ |
| 57 | + "<(module_root_dir)/deps/librdkafka.gyp:librdkafkacpp" |
| 58 | + ], |
| 59 | + "include_dirs": [ "deps/librdkafka/src-cpp" ], |
| 60 | + }, |
| 61 | + # Else link against globally installed rdkafka and use |
| 62 | + # globally installed headers. On Debian, you should |
| 63 | + # install the librdkafka1, librdkafka++1, and librdkafka-dev |
| 64 | + # .deb packages. |
| 65 | + { |
| 66 | + "libraries": ["-lrdkafka", "-lrdkafka++"], |
| 67 | + "include_dirs": [ |
| 68 | + "/usr/include/librdkafka", |
| 69 | + "/usr/local/include/librdkafka" |
| 70 | + ], |
| 71 | + }, |
| 72 | + ], |
| 73 | + [ |
| 74 | + 'OS=="linux"', |
| 75 | + { |
| 76 | + 'cflags_cc' : [ |
| 77 | + '-std=c++11' |
| 78 | + ], |
| 79 | + 'cflags_cc!': [ |
| 80 | + '-fno-rtti' |
| 81 | + ] |
76 | 82 | }
|
77 | 83 | ],
|
78 |
| - ] |
79 |
| - } |
80 |
| - ], |
81 |
| - [ "<(WITH_LZ4)==1", |
82 |
| - { |
83 |
| - 'libraries' : ['-llz4'], |
84 |
| - 'conditions': [ |
85 |
| - [ 'OS=="mac"', |
| 84 | + [ |
| 85 | + 'OS=="mac"', |
86 | 86 | {
|
87 | 87 | 'xcode_settings': {
|
88 |
| - 'libraries' : ['-llz4'] |
89 |
| - } |
| 88 | + 'MACOSX_DEPLOYMENT_TARGET': '10.11', |
| 89 | + 'GCC_ENABLE_CPP_RTTI': 'YES', |
| 90 | + 'OTHER_CPLUSPLUSFLAGS': [ |
| 91 | + '-std=c++11' |
| 92 | + ], |
| 93 | + }, |
90 | 94 | }
|
91 |
| - ], |
| 95 | + ] |
92 | 96 | ]
|
93 | 97 | }
|
94 | 98 | ]
|
|
0 commit comments