-
Notifications
You must be signed in to change notification settings - Fork 40
/
binding.gyp
85 lines (85 loc) · 2.34 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
{
'targets': [
{
'target_name': 'uiohook_napi',
'dependencies': ['libuiohook'],
'sources': [
'src/lib/addon.c',
'src/lib/napi_helpers.c',
'src/lib/uiohook_worker.c',
],
'include_dirs': [
'libuiohook/include',
'src/lib',
]
},
{
'target_name': 'libuiohook',
'type': 'static_library',
'sources': [
'libuiohook/src/logger.c',
],
'include_dirs': [
'libuiohook/include',
'libuiohook/src',
],
"conditions": [
['OS=="win"', {
'sources': [
'libuiohook/src/windows/input_helper.c',
'libuiohook/src/windows/input_hook.c',
'libuiohook/src/windows/post_event.c',
'libuiohook/src/windows/system_properties.c'
],
'include_dirs': [
'libuiohook/src/windows'
]
}],
['OS=="linux"', {
'defines': [
'USE_XRANDR', 'USE_EVDEV', 'USE_XT'
],
'link_settings': {
'libraries': [
'-lX11', '-lXrandr', '-lXtst', '-lpthread', '-lXt'
],
},
'cflags': ['-std=c99', '-pedantic', '-Wall', '-pthread'],
'sources': [
'libuiohook/src/x11/input_helper.c',
'libuiohook/src/x11/input_hook.c',
'libuiohook/src/x11/post_event.c',
'libuiohook/src/x11/system_properties.c'
],
'include_dirs': [
'libuiohook/src/x11'
]
}],
['OS=="mac"', {
"defines":[
"__MACOSX_CORE__","USE_IOKIT","USE_APPLICATION_SERVICES","USE_OBJC"
],
"link_settings": {
"libraries": [
"-framework IOKit",
"-framework Carbon",
"-framework ApplicationServices",
"-framework AppKit",
"-framework CoreFoundation"
],
},
'cflags': ['-std=c99', '-pedantic', '-Wall', '-pthread'],
'sources': [
"libuiohook/src/darwin/input_helper.c",
"libuiohook/src/darwin/input_hook.c",
"libuiohook/src/darwin/post_event.c",
"libuiohook/src/darwin/system_properties.c"
],
'include_dirs': [
'libuiohook/src/darwin'
]
}]
]
}
]
}