forked from yfinkelstein/node-zookeeper
-
Notifications
You must be signed in to change notification settings - Fork 1
/
binding.gyp
60 lines (60 loc) · 2.16 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
{
'variables': {
'platform': '<(OS)',
},
"targets": [{
"target_name": "zookeeper",
'dependencies': ['libzk'],
"sources": ["src/node-zk.cpp"],
'cflags': ['-Wall', '-O0'],
'conditions': [
['OS=="solaris"', {
'cflags': ['-Wno-strict-aliasing'],
'defines': ['_POSIX_PTHREAD_SEMANTICS'],
'include_dirs': [
'/opt/local/include/zookeeper',
'<!(node -e "require(\'nan\')")'
],
'ldflags': ['-lzookeeper_st'],
}],
['OS=="mac"',{
'include_dirs': [
'<(module_root_dir)/deps/zookeeper/src/c/include',
'<(module_root_dir)/deps/zookeeper/src/c/generated',
'<!(node -e "require(\'nan\')")'
],
'libraries': ['<(module_root_dir)/deps/zookeeper/src/c/.libs/libzookeeper_st.a'],
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'
}
}],['OS=="linux"',{
'include_dirs': [
'<(module_root_dir)/deps/zookeeper/src/c/include',
'<(module_root_dir)/deps/zookeeper/src/c/generated',
'<!(node -e "require(\'nan\')")'
],
'libraries': ['<(module_root_dir)/deps/zookeeper/src/c/.libs/libzookeeper_st.a'],
}]
]},
{
'target_name': 'libzk',
'type': 'none',
'actions': [{
'action_name': 'build_zk_client_lib',
'inputs': [''],
'outputs': [''],
'action': ['sh', 'scripts/build.sh']
}]
},
{
"target_name": "after_build",
"type": "none",
"dependencies": ["zookeeper"],
"actions": [{
"action_name": "symlink",
"inputs": ["<@(PRODUCT_DIR)/zookeeper.node"],
"outputs": ["<(module_root_dir)/build/zookeeper.node"],
"action": ["sh", "scripts/symlink.sh", "<@(_inputs)"]
}]
}],
}