forked from kmamal/node-sdl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinding.gyp
65 lines (65 loc) · 1.61 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
{
'targets': [{
'target_name': 'sdl',
'sources': [
'src/native/module.cpp',
'src/native/enums.cpp',
'src/native/global.cpp',
'src/native/events.cpp',
'src/native/video.cpp',
'src/native/window.cpp',
'src/native/keyboard.cpp',
'src/native/mouse.cpp',
'src/native/joystick.cpp',
'src/native/controller.cpp',
'src/native/sensor.cpp',
'src/native/audio.cpp',
'src/native/clipboard.cpp',
'src/native/power.cpp',
],
'dependencies': [
"<!(node -p \"require('node-addon-api').targets\"):node_addon_api_except",
],
'defines': [
'NAPI_VERSION=<(napi_build_version)',
'NODE_ADDON_API_DISABLE_DEPRECATED',
],
'conditions': [
['OS == "linux"', {
'cflags': [ '-D_REENTRANT' ],
'cflags_cc': [ '-std=c++17' ],
'include_dirs': [ '$(SDL_INC)' ],
'libraries': [ '-L$(SDL_LIB)', '-lSDL2' ],
'link_settings': {
'libraries': [ "-Wl,-rpath,'$$ORIGIN'" ],
},
}],
['OS == "mac"', {
'sources': [
'src/native/cocoa-global.mm',
'src/native/cocoa-window.mm',
],
'cflags': [ '-D_THREAD_SAFE' ],
'xcode_settings': { 'OTHER_CFLAGS': [ '-std=c++17' ] },
'include_dirs': [
'$(SDL_INC)',
'/opt/X11/include',
],
'libraries': [ '-L$(SDL_LIB)', '-lSDL2' ],
'link_settings': {
'libraries': [ '-Wl,-rpath,@loader_path' ],
},
}],
['OS == "win"', {
'cflags': [ '-D_REENTRANT' ],
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': [ '-std:c++17' ],
},
},
'include_dirs': [ '<!(echo %SDL_INC%)' ],
'libraries': [ '-l<!(echo %SDL_LIB%)\\SDL2.lib' ],
}],
],
}],
}