forked from solettaproject/soletta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
binding.gyp
73 lines (73 loc) · 1.75 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
{
"variables": {
"BUILD_SOLETTA": '<!(test "x${SOLETTA_CFLAGS}x" = "xx" -o "x${SOLETTA_LIBS}x" = "xx" && echo "true" || echo "false")',
},
"conditions": [
[ "'<(BUILD_SOLETTA)'=='true'", {
"targets": [
{
"target_name": "csdk",
"type": "none",
"actions": [ {
"action_name": "build-csdk",
"message": "Building C SDK",
"outputs": [ "build/soletta_sysroot" ],
"inputs": [ "" ],
"action": [ "sh", "bindings/nodejs/build-for-npm.sh" ]
} ]
}
]
}, {
"targets": [
{
"target_name": "collectbindings",
"type": "none",
"actions": [ {
"action_name": "collectbindings",
"message": "Collecting bindings",
"outputs": [ "bindings/nodejs/generated/main.cc" ],
"inputs": [
"bindings/nodejs/generated/main.cc.prologue",
"bindings/nodejs/generated/main.cc.epilogue",
],
"action": [
"sh",
"-c",
'./bindings/nodejs/generate-main.sh'
]
} ]
},
{
"target_name": "copyapis",
"type": "none",
"actions": [ {
"action_name": "copyapis",
"message": "Copying JS APIs",
"inputs": [ "./bindings/nodejs/lib" ],
"outputs": [ "" ],
"action": [
"sh",
"-c",
"cp -a ./bindings/nodejs/lib/* ."
]
} ]
},
{
"target_name": "soletta",
"includes": [
"bindings/nodejs/generated/nodejs-bindings-sources.gyp"
],
"include_dirs": [
"<!(node -e \"require('nan')\")"
],
"cflags": [ '<!@(echo "${SOLETTA_CFLAGS}")' ],
"xcode_settings": {
"OTHER_CFLAGS": [ '<!@(echo "${SOLETTA_CFLAGS}")' ]
},
"libraries": [ '<!@(echo "${SOLETTA_LIBS}")' ],
"dependencies": [ "collectbindings", "copyapis" ]
}
]
} ]
]
}