forked from y-a-v-a/node-gd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
binding.gyp
115 lines (115 loc) · 3.03 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
109
110
111
112
113
114
115
{
"conditions": [
['OS!="win"', {
'variables': {
'with_avif%': '<!(./util.sh avif)',
'with_heif%': '<!(./util.sh heif)',
'with_tiff%': '<!(./util.sh tiff)',
'with_xpm%': '<!(./util.sh xpm)',
'with_jpeg%': '<!(./util.sh jpeg)',
'with_fontconfig%': '<!(./util.sh fontconfig)',
'with_freetype%': '<!(./util.sh freetype)',
'with_png%': '<!(./util.sh png16)',
'with_webp%': '<!(./util.sh webp)',
'with_vpx%': '<!(./util.sh vpx)'
}
}]
],
"targets": [
{
"target_name": "node_gd",
"sources": [
"src/addon.cc"
],
"libraries": ["-lgd"],
"include_dirs": [
"<!@(node -p \"require('node-addon-api').include\")"
],
'dependencies': ["<!(node -p \"require('node-addon-api').gyp\")"],
'defines': [ 'NAPI_CPP_EXCEPTIONS' ],
"conditions": [
[ "OS=='linux'", {
"cflags!": [ '-fno-exceptions' ],
"cflags_cc!": [ "-fno-exceptions" ]
}],
[ "OS=='freebsd'", {
"libraries": ["-L/usr/local/lib"],
"include_dirs": ["/usr/local/include"],
"cflags!": [ '-fno-exceptions' ],
"cflags_cc!": [ "-fno-exceptions" ]
}],
[ "OS=='mac'", {
'cflags+': ['-fvisibility=hidden'],
'cflags!': [ '-fno-exceptions' ],
'cflags_cc!': [ '-fno-exceptions' ],
'xcode_settings': {
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'
},
"libraries": ["-L/opt/homebrew/lib", "-L/usr/local/lib", "-L/opt/local/lib"],
"include_dirs": ["/opt/homebrew/include", "/usr/local/include", "/opt/local/include"]
}],
["with_heif=='true'", {
'defines': [
'HAVE_LIBHEIF',
'GD_HEIF'
]
}],
["with_avif=='true'", {
'defines': [
'HAVE_LIBAVIF',
'GD_AVIF'
]
}],
["with_tiff=='true'", {
'defines': [
'HAVE_LIBTIFF',
'GD_TIFF'
]
}],
["with_xpm=='true'", {
'defines': [
'HAVE_LIBXPM',
'GD_XPM'
]
}],
["with_jpeg=='true'", {
'defines': [
'HAVE_LIBJPEG',
'GD_JPEG'
]
}],
["with_fontconfig=='true'", {
'defines': [
'HAVE_LIBFONTCONFIG',
'GD_FONTCONFIG'
]
}],
["with_freetype=='true'", {
'defines': [
'HAVE_LIBFREETYPE',
'GD_FREETYPE'
]
}],
["with_png=='true'", {
'defines': [
'HAVE_LIBPNG',
'GD_PNG'
]
}],
["with_webp=='true'", {
'defines': [
'HAVE_LIBWEBP',
'GD_WEBP'
]
}],
["with_vpx=='true'", {
'defines': [
'HAVE_LIBVPX',
'GD_VPX'
]
}]
]
}
]
}