-
Notifications
You must be signed in to change notification settings - Fork 17
/
binding.gyp
34 lines (34 loc) · 1.1 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
{
"variables": {
"NODEJS": "<!(['sh', '-c', 'which nodejs || which node'])"
},
"targets": [
{
"target_name": "daemon",
"defines": [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ],
"sources": [ "src/daemon.cc" ],
"include_dirs": [
"<!(<(NODEJS) -p \"require('node-addon-api').include\")"
],
"libraries": [
"<!@(['sh', '-c', 'pkg-config --silence-errors --libs-only-l libsystemd || pkg-config --silence-errors --libs-only-l libsystemd-daemon'])"
]
},
{
"target_name": "install_daemon_node",
"dependencies": ["daemon"],
"actions": [
{
"action_name": "install_daemon_node",
"inputs": [
"<@(PRODUCT_DIR)/daemon.node"
],
"outputs": [
"daemon.node"
],
"action": ["cp", "<@(PRODUCT_DIR)/daemon.node", "daemon.node"]
}
]
}
]
}