forked from stackgl/headless-gl
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbinding.gyp
47 lines (47 loc) · 1.19 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
{
'variables': {
'platform': '<(OS)',
},
'conditions': [
# Replace gyp platform with node platform, blech
['platform == "mac"', {'variables': {'platform': 'darwin'}}],
['platform == "win"', {'variables': {'platform': 'win32'}}],
],
'targets': [
{
'target_name': 'webgl',
'defines': [
'VERSION=0.1.3'
],
'sources': [
'src/bindings.cc',
'src/webgl.cc',
],
'include_dirs': [
'./deps/include',
"<!(node -e \"require('nan')\")",
],
'library_dirs': [
'./deps/<(platform)',
],
'conditions': [
['OS=="mac"', {'libraries': ['-framework AGL', '-framework OpenGL']}],
['OS=="linux"', {'libraries': ['-lGL', '-lGLEW']}],
['OS=="win"', {
'libraries': [ 'opengl32.lib' ],
'defines' : [
'WIN32_LEAN_AND_MEAN',
'VC_EXTRALEAN'
],
'cflags' : [
'/Ox','/Ob2','/Oi','/Ot','/Oy','/GL','/GF','/Gm-','/EHsc','/MT','/GS','/Gy','/GR-','/Gd','/wd"4530"','/wd"4251"'
],
'ldflags' : [
'/OPT:REF','/OPT:ICF','/LTCG'
]
}
],
],
}
]
}