-
Notifications
You must be signed in to change notification settings - Fork 0
/
binding.gyp
75 lines (75 loc) · 2.79 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
74
75
{
"targets": [
{
"target_name": "node_bzip2",
"actions": [
{
"action_name": "configure_bzip2",
"inputs": [],
"outputs": ["<(INTERMEDIATE_DIR)/bzip2/bz_version.h"],
"action": [
"cmake",
"-S",
"lib/bzip2",
"-B",
"<(INTERMEDIATE_DIR)/bzip2",
"-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0",
"-DCMAKE_BUILD_TYPE=Release",
"-DENABLE_LIB_ONLY=1",
"-DENABLE_SHARED_LIB=0",
"-DENABLE_STATIC_LIB=1"
"-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL",
],
},
{
"action_name": "build_bzip2",
"inputs": ["<(INTERMEDIATE_DIR)/bzip2/bz_version.h"],
"outputs": [],
"action": [
"cmake",
"--build",
"<(INTERMEDIATE_DIR)/bzip2",
"--config=Release",
],
"conditions": [
[
'OS=="win"',
{
"outputs": [
"<(INTERMEDIATE_DIR)/bzip2/Release/bz2_static.lib"
]
},
{"outputs": ["<(INTERMEDIATE_DIR)/bzip2/libbz2_static.a"]},
]
],
},
],
"sources": ["src/node_bzip2_wrapper.cpp"],
"include_dirs": ["<!(node -e \"require('nan')\")", "lib/bzip2"],
"cflags!": ["-fno-exceptions"],
"cflags_cc!": ["-fno-exceptions"],
"msvs_settings": {
"VCCLCompilerTool": {
"ExceptionHandling": 1,
"RuntimeLibrary": "MultiThreadedDLL",
"AdditionalOptions": ["/MD"],
}
},
"xcode_settings": {"GCC_ENABLE_CPP_EXCEPTIONS": "YES"},
"conditions": [
[
'OS=="mac"',
{
"cflags": ["-mmacosx-version-min=11.0"],
},
],
['OS=="win"', {"defines": ["_HAS_EXCEPTIONS=1"]}],
[
"OS=='win'",
{"libraries": ["<(INTERMEDIATE_DIR)/bzip2/Release/bz2_static.lib"]},
{"libraries": ["<(INTERMEDIATE_DIR)/bzip2/libbz2_static.a"]},
],
],
}
]
}