-
Notifications
You must be signed in to change notification settings - Fork 9
/
binding.gyp
56 lines (56 loc) · 1.48 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
{
'variables': {
'platform': '<(OS)',
},
'conditions': [
# Replace gyp platform with node platform, blech
['platform == "mac"', {'variables': {'platform': 'darwin'}}],
['platform == "win"', {'variables': {'platform': 'win32'}}],
],
'targets': [
{
#'target_name': 'image-<(platform)-<(target_arch)',
'target_name': 'image',
'defines': [
'VERSION=0.7.1'
],
'include_dirs' : [
"<!(node -e \"require('nan')\")",
],
'sources': [ 'src/bindings.cpp', 'src/FreeImage.cpp', 'src/Image.cpp' ],
'conditions': [
['OS=="linux"', {'libraries': ['-lfreeimage']}],
['OS=="mac"',
{
'libraries': ['-lfreeimage'],
'include_dirs': ['/usr/local/include'],
'library_dirs': ['/usr/local/lib'],
}
],
['OS=="win"',
{
'include_dirs': [
'./deps/FreeImage/include'
],
'library_dirs': [
'./deps/FreeImage/windows/lib/<(target_arch)'
],
'libraries': [
'FreeImage.lib'
],
'defines' : [
'WIN32_LEAN_AND_MEAN',
'VC_EXTRALEAN'
],
'cflags' : [
'/O2','/Oy','/GL','/GF','/Gm-','/EHsc','/MT','/GS','/Gy','/GR-','/Gd'
],
'ldflags' : [
'/OPT:REF','/OPT:ICF','/LTCG'
]
},
],
],
}
]
}