forked from Rosga/libuiohook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinding.gyp
114 lines (109 loc) · 4.02 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
{
'targets': [
{
'target_name': 'iohook',
'include_dirs': [
"<!(node -e \"require('nan')\")",
"include",
"src"
],
'cflags': [
'-Wall',
'-Wparentheses',
'-Winline',
'-Wbad-function-cast',
'-Wdisabled-optimization',
'-fexceptions'
],
'cflags_cc': ['-fexceptions'],
'cflags!': [ '-fno-exceptions' ],
'cflags_cc!': [ '-fno-exceptions' ],
"msvs_settings": {
"VCCLCompilerTool": {
'RuntimeLibrary': 2, # shared release
'ExceptionHandling': 1, # /EHsc doesn't work.
'AdditionalOptions': ['/EHsc']
}
},
'conditions': [
['OS == "mac"', {
'defines': ['USE_IOKIT=1', 'USE_OBJC=1', '__MAC_OS_X_VERSION_MAX_ALLOWED=101000'],
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'
},
'include_dirs': [
'System/Library/Frameworks/CoreFoundation.Framework/Headers',
'System/Library/Frameworks/Foundation.framework/Headers',
'System/Library/Frameworks/Carbon.Framework/Headers',
'System/Library/Frameworks/ApplicationServices.framework/Headers',
'System/Library/Frameworks/IOKit.framework/Headers',
'System/Library/Frameworks/Cocoa.framework/Headers',
'System/Library/Frameworks/OpenGL.framework/Headers'
],
"sources": [
"src/darwin/system_properties.c",
"src/darwin/input_helper.c",
"src/darwin/input_hook.c"
],
'link_settings': {
'libraries': [
'-framework Carbon',
'-framework CoreFoundation',
'-framework ApplicationServices',
'-framework Cocoa',
'-framework Foundation',
'-framework OpenGL',
'-framework IOKit'
]
},
}],
['OS == "linux"', {
'link_settings': {
'libraries': [
'-lpng',
'-lz',
'-lX11',
'-lXtst'
]
},
"sources": [
"src/linux/system_properties.c",
"src/linux/input_helper.c",
"src/linux/input_hook.c"
],
}],
["OS=='win'", {
'defines': ['IS_WINDOWS', '_HAS_EXCEPTIONS=1'],
'link_settings': {
'libraries': [
'Oleacc',
"UIAutomationCore",
"Dwmapi",
"comsuppw"
]
},
"sources": [
"src/windows/system_properties.c",
"src/windows/input_helper.c",
"src/windows/input_hook.c"
],
}]
],
'sources': [
"src/iohook.cc",
"src/logger.c"
]
},
{
"target_name": "release",
"type": "none",
"dependencies": [ "iohook" ],
"copies": [
{
"files": [ "<(PRODUCT_DIR)/iohook.node" ],
"destination": "./lib"
}
],
},
]
}