1 | {
|
2 | "variables": {
|
3 | "NODE_VERSION%":"<!(node -p \"process.versions.node.split(\\\".\\\")[0]\")"
|
4 | },
|
5 | 'targets': [
|
6 | {
|
7 | 'target_name': 'bcrypt_lib',
|
8 | 'sources': [
|
9 | 'src/blowfish.cc',
|
10 | 'src/bcrypt.cc',
|
11 | 'src/bcrypt_node.cc'
|
12 | ],
|
13 | 'defines': [
|
14 | '_GNU_SOURCE',
|
15 | ],
|
16 | 'cflags!': [ '-fno-exceptions' ],
|
17 | 'cflags_cc!': [ '-fno-exceptions' ],
|
18 | 'include_dirs' : [
|
19 | "<!@(node -p \"require('node-addon-api').include\")"
|
20 | ],
|
21 | 'dependencies': ["<!(node -p \"require('node-addon-api').gyp\")"],
|
22 | 'conditions': [
|
23 | ['OS=="win"', {
|
24 | "msvs_settings": {
|
25 | "VCCLCompilerTool": {
|
26 | "ExceptionHandling": 1
|
27 | }
|
28 | },
|
29 | 'defines': [
|
30 | 'uint=unsigned int',
|
31 | ]
|
32 | }],
|
33 | ['OS=="mac"', {
|
34 | 'cflags+': ['-fvisibility=hidden'],
|
35 | "xcode_settings": {
|
36 | "CLANG_CXX_LIBRARY": "libc++",
|
37 | 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
|
38 | 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES',
|
39 | }
|
40 | }],
|
41 | ['OS=="zos" and NODE_VERSION <= 16',{
|
42 | 'cflags': [
|
43 | '-qascii',
|
44 | ],
|
45 | 'defines': ["NAPI_DISABLE_CPP_EXCEPTIONS"],
|
46 | }],
|
47 | ],
|
48 | },
|
49 | {
|
50 | "target_name": "action_after_build",
|
51 | "type": "none",
|
52 | "dependencies": [ "<(module_name)" ],
|
53 | "copies": [
|
54 | {
|
55 | "files": [ "<(PRODUCT_DIR)/<(module_name).node" ],
|
56 | "destination": "<(module_path)"
|
57 | }
|
58 | ]
|
59 | }
|
60 | ]
|
61 | }
|