forked from signalapp/libsignal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
binding.gyp
36 lines (35 loc) · 1.29 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
#
# Copyright (C) 2020 Signal Messenger, LLC.
# SPDX-License-Identifier: AGPL-3.0-only
#
{
'conditions': [
['OS=="mac"', {'variables': {'NODE_OS_NAME': 'darwin'}},
'OS=="win"', {'variables': {'NODE_OS_NAME': 'win32'}},
{'variables': {'NODE_OS_NAME': '<(OS)'}}],
],
'targets': [
{
'target_name': 'libsignal_client_<(NODE_OS_NAME).node',
'type': 'none',
'actions': [
{
'action_name': 'node/build_node_bridge.sh',
'action': [
'env',
'CONFIGURATION_NAME=<(CONFIGURATION_NAME)',
'CARGO_BUILD_TARGET_DIR=<(INTERMEDIATE_DIR)/rust',
'NODE_OS_NAME=<(NODE_OS_NAME)',
'node/build_node_bridge.sh',
'-o', '<(PRODUCT_DIR)/'],
'inputs': [],
'outputs': [
'<(PRODUCT_DIR)/<(_target_name)',
# This really needs to be environment-variable-sensitive, but node-gyp doesn't support that. Cargo will still save work if possible.
'<(PRODUCT_DIR)/nonexistent-file-to-force-rebuild'
]
}
]
}
]
}