-
Notifications
You must be signed in to change notification settings - Fork 19
/
binding.gyp
108 lines (108 loc) · 3.58 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
{
"targets": [
{
"target_name": "ghostscript4js",
"sources": ["src/ghostscript4js.cc"],
'cflags!': [ '-fno-exceptions' ],
'cflags_cc!': [ '-fno-exceptions' ],
"include_dirs": [
"<!@(node -p \"require('node-addon-api').include\")"
],
'dependencies': [
"<!(node -p \"require('node-addon-api').gyp\")"
],
"conditions": [
['OS=="linux"', {
'variables': {
"GS4JS_HOME%": "<!(echo $GS4JS_HOME)",
"GS4JS_LIB%": "<!(echo $GS4JS_LIB)",
"conditions": [
['"<!(echo $GS4JS_HOME)" == ""', {
"GS4JS_HOME%": "/usr/lib/x86_64-linux-gnu"
}],
['"<!(echo $GS4JS_LIB)" == ""', {
"GS4JS_LIB%": "libgs.so"
}]
]
},
"libraries": ["<(GS4JS_HOME)/<(GS4JS_LIB)"]
}],
['OS=="win"', {
"conditions": [
['target_arch=="x64"', {
"variables": {
"GS4JS_HOME%": "<!(node gs4js-env-home.js)",
"GS4JS_LIB%": "<!(node gs4js-env-lib.js)",
"GS4JS_DLL%": "<!(node gs4js-env-dll.js)",
"conditions": [
['"<!(node gs4js-env-home.js)" == ""', {
"GS4JS_HOME%": "C:/gs/bin"
}],
['"<!(node gs4js-env-lib.js)" == ""', {
"GS4JS_LIB%": "gsdll64.lib"
}],
['"<!(node gs4js-env-dll.js)" == ""', {
"GS4JS_DLL%": "gsdll64.dll"
}]
]
}
},
{
"variables": {
"GS4JS_HOME%": "<!(node gs4js-env-home.js)",
"GS4JS_LIB%": "<!(node gs4js-env-lib.js)",
"GS4JS_DLL%": "<!(node gs4js-env-dll.js)",
"conditions": [
['"<!(node gs4js-env-home.js)" == ""', {
"GS4JS_HOME%": "C:/gs/bin"
}],
['"<!(node gs4js-env-lib.js)" == ""', {
"GS4JS_LIB%": "gsdll32.lib"
}],
['"<!(node gs4js-env-dll.js)" == ""', {
"GS4JS_DLL%": "gsdll32.dll"
}]
]
}
}]
],
"msvs_settings": {
"VCCLCompilerTool": {
"ExceptionHandling": 1
}
},
"libraries": ["<(module_root_dir)/build/Release/<(GS4JS_LIB)"],
"copies": [
{
"destination": "<(module_root_dir)/build/Release",
"files": ["<(GS4JS_HOME)/<(GS4JS_DLL)", "<(GS4JS_HOME)/<(GS4JS_LIB)"]
}
]
}],
['OS=="mac"', {
'cflags+': ['-fvisibility=hidden'],
'xcode_settings': {
#'CLANG_CXX_LANGUAGE_STANDARD': 'c++11',
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
#'CLANG_CXX_LIBRARY': 'libc++',
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
#'MACOSX_DEPLOYMENT_TARGET': '10.7'
},
'variables': {
"GS4JS_HOME%": "<!(echo $GS4JS_HOME)",
"GS4JS_LIB%": "<!(echo $GS4JS_LIB)",
"conditions": [
['"<!(echo $GS4JS_HOME)" == ""', {
"GS4JS_HOME%": "<!(node macOS-lib-path-finder.js)"
}],
['"<!(echo $GS4JS_LIB)" == ""', {
"GS4JS_LIB%": "libgs.dylib"
}]
]
},
"libraries": ["<(GS4JS_HOME)/<(GS4JS_LIB)"]
}]
]
}
]
}