Skip to content

Commit 3002796

Browse files
format
1 parent 9ea7dbd commit 3002796

File tree

1 file changed

+68
-45
lines changed

1 file changed

+68
-45
lines changed

binding.gyp

Lines changed: 68 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,72 @@
11
{
2-
'targets': [{
3-
'target_name': 'zstd',
4-
'type': 'loadable_module',
5-
'defines': ['ZSTD_STATIC_LINKING_ONLY'],
6-
'include_dirs': [
7-
"<!(node -p \"require('node-addon-api').include_dir\")",
8-
"<(module_root_dir)/deps/zstd/lib",
9-
],
10-
'variables': {
11-
'ARCH': '<(host_arch)',
12-
'built_with_electron%': 0
13-
},
14-
'sources': [
15-
'addon/zstd.cpp',
16-
'addon/compression_worker.h',
17-
'addon/compression.h',
18-
'addon/compression.cpp'
19-
],
20-
'xcode_settings': {
21-
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
22-
'CLANG_CXX_LIBRARY': 'libc++',
23-
'MACOSX_DEPLOYMENT_TARGET': '11',
24-
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
25-
'OTHER_CFLAGS': [
2+
"targets": [
3+
{
4+
"target_name": "zstd",
5+
"type": "loadable_module",
6+
"defines": [
7+
"ZSTD_STATIC_LINKING_ONLY=true"
8+
],
9+
"include_dirs": [
10+
"<!(node -p \"require(\"node-addon-api\").include_dir\")",
11+
"<(module_root_dir)/deps/zstd/lib"
12+
],
13+
"variables": {
14+
"ARCH": "<(host_arch)",
15+
"built_with_electron%": 0
16+
},
17+
"sources": [
18+
"addon/zstd.cpp",
19+
"addon/compression_worker.h",
20+
"addon/compression.h",
21+
"addon/compression.cpp"
22+
],
23+
"xcode_settings": {
24+
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
25+
"CLANG_CXX_LIBRARY": "libc++",
26+
"MACOSX_DEPLOYMENT_TARGET": "11",
27+
"GCC_SYMBOLS_PRIVATE_EXTERN": "YES",
28+
"OTHER_CFLAGS": [
2629
"-std=c++17",
2730
"-stdlib=libc++"
28-
]
29-
},
30-
'cflags!': [ '-fno-exceptions' ],
31-
'cflags_cc!': [ '-fno-exceptions' ],
32-
'cflags_cc': ['-std=c++17'],
33-
"conditions": [
34-
['OS=="win"', {
35-
'msvs_settings': {
36-
'VCCLCompilerTool': { 'ExceptionHandling': 1 },
37-
'AdditionalOptions': [ '-std:c++17', ],
38-
},
39-
}],
40-
],
41-
42-
43-
'link_settings': {
44-
'libraries': [
45-
'<(module_root_dir)/deps/zstd/build/cmake/lib/libzstd.a',
46-
]
47-
},
48-
}]
31+
]
32+
},
33+
"cflags!": [
34+
"-fno-exceptions"
35+
],
36+
"cflags_cc!": [
37+
"-fno-exceptions"
38+
],
39+
"cflags_cc": [
40+
"-std=c++17"
41+
],
42+
"conditions": [
43+
[
44+
"OS=='win'",
45+
{
46+
"msvs_settings": {
47+
"VCCLCompilerTool": {
48+
"ExceptionHandling": 1,
49+
"AdditionalOptions": [
50+
"-std:c++17"
51+
]
52+
}
53+
},
54+
"include_dirs": [
55+
"<(module_root_dir)/deps/include"
56+
],
57+
"link_settings": {
58+
"libraries": [
59+
"<(module_root_dir)/deps/zstd/build/cmake/lib/libzstd.lib"
60+
]
61+
}
62+
}
63+
]
64+
],
65+
"link_settings": {
66+
"libraries": [
67+
"<(module_root_dir)/deps/zstd/build/cmake/lib/libzstd.a"
68+
]
69+
}
70+
}
71+
]
4972
}

0 commit comments

Comments
 (0)