forked from mekanoe/node-openvr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinding.gyp
91 lines (90 loc) · 2.93 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
{
'variables': {
'platform': '<(OS)',
},
'conditions': [
['platform == "mac"', {'variables': {'platform': 'darwin'}}],
['platform == "win"', {'variables': {'platform': 'win32'}}],
],
'targets': [
{
'target_name': 'openvr',
'cflags!': [ '-fno-exceptions' ],
'cflags_cc!': [ '-fno-exceptions' ],
'xcode_settings': { 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'CLANG_CXX_LIBRARY': 'libc++',
'MACOSX_DEPLOYMENT_TARGET': '10.7',
},
'msvs_settings': {
'VCCLCompilerTool': { 'ExceptionHandling': 1 },
},
'defines': [
'VERSION=1.0.16'
],
'sources': [
'src/bindings.cpp',
'src/ivrsystem.cpp',
'src/ivroverlay.cpp',
'src/ivrnotifications.cpp',
'src/openvr.cpp'
],
'include_dirs': [
'<!(node -p "require(\'node-addon-api\').include_dir")',
'<(module_root_dir)/lib/openvr/headers',
'<(module_root_dir)/lib/glfw/include',
'<(module_root_dir)/lib/openvr/samples/thirdparty/sdl2-2.0.3/include'
],
'conditions': [
['OS=="linux"', {
'library_dirs': ['<(module_root_dir)/lib/openvr/lib/linux64'],
'libraries': ['<(module_root_dir)/lib/openvr/lib/linux64/libopenvr_api.so'],
'copies':
[
{
'destination': '<(module_root_dir)/build/Release',
'files': ['<(module_root_dir)/lib/openvr/bin/linux64/libopenvr_api.so']
}
],
}],
['OS=="mac"', {
'library_dirs': ['<(module_root_dir)/lib/openvr/lib/osx32'],
'libraries': ['libopenvr_api.dylib'],
'cflags+': ['-fvisibility=hidden'],
'xcode_settings': {
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
},
'copies':
[
{
'destination': '<(module_root_dir)/build/Release',
'files': ['<(module_root_dir)/lib/openvr/bin/osx32/libopenvr_api.dylib']
}
],
}],
['OS=="win"', {
'library_dirs': ['<(module_root_dir)/lib/openvr/lib/win64', '<(module_root_dir)/lib/glfw/lib-vc2015'],
'libraries': ['openvr_api.lib', 'glfw3dll.lib', 'opengl32.lib'],
'defines' : ['VC_EXTRALEAN', 'NOMINMAX'],
'msvs_settings' : {
'VCCLCompilerTool' : {
'AdditionalOptions' : ['/O2','/Oy','/GL','/GF','/Gm-','/EHsc','/MT','/GS','/Gy','/GR-','/Gd']
},
'VCLinkerTool' : {
'AdditionalOptions' : ['/OPT:REF','/OPT:ICF','/LTCG']
},
},
'copies':
[
{
'destination': '<(module_root_dir)/build/Release',
'files': [
'<(module_root_dir)/lib/openvr/bin/win64/openvr_api.dll',
'<(module_root_dir)/lib/glfw/lib-vc2015/glfw3.dll',
]
}
],
}],
],
}
]
}