-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbinding.gyp
91 lines (91 loc) · 3.42 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
{
'targets': [
{
'target_name': 'keyboard-auto-type',
'sources': [
'src/addon-main.cpp',
'src/addon-auto-type.cpp',
'src/addon-key-code.cpp',
'src/addon-modifier.cpp',
'keyboard-auto-type/keyboard-auto-type/src/auto-type.cpp',
'keyboard-auto-type/keyboard-auto-type/src/utils.cpp',
],
'include_dirs': [
'keyboard-auto-type/keyboard-auto-type/include',
'keyboard-auto-type/keyboard-auto-type/src',
'<!(node -p "require(\'node-addon-api\').include_dir")'
],
'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ],
'cflags': [ '-fno-exceptions' ],
'cflags_cc': [ '-fno-exceptions' ],
'conditions': [
[ 'OS=="mac"', {
'sources': [
'keyboard-auto-type/keyboard-auto-type/src/darwin/auto-type-darwin.cpp',
'keyboard-auto-type/keyboard-auto-type/src/darwin/carbon-helpers.cpp',
'keyboard-auto-type/keyboard-auto-type/src/darwin/key-map.cpp',
'keyboard-auto-type/keyboard-auto-type/src/darwin/native-methods.mm',
],
'xcode_settings': {
'CLANG_CXX_LIBRARY': 'libc++',
'MACOSX_DEPLOYMENT_TARGET': '10.7',
'GCC_ENABLE_CPP_EXCEPTIONS': 'NO',
'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++17',
'CLANG_ENABLE_OBJC_ARC': 'YES',
},
'link_settings': {
'libraries': [
"$(SDKROOT)/System/Library/Frameworks/AppKit.framework",
"$(SDKROOT)/System/Library/Frameworks/Carbon.framework",
"$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework",
"$(SDKROOT)/System/Library/Frameworks/ScriptingBridge.framework",
]
}
}],
[ 'OS=="win"', {
'sources': [
'keyboard-auto-type/keyboard-auto-type/src/win32/auto-type-win32.cpp',
'keyboard-auto-type/keyboard-auto-type/src/win32/key-map.cpp',
'keyboard-auto-type/keyboard-auto-type/src/win32/winapi-tools.cpp',
],
'defines': [
'UNICODE',
'_UNICODE'
],
'msvs_settings': {
'VCLinkerTool': {
'AdditionalDependencies': ['Shlwapi.lib']
},
'VCCLCompilerTool': {
'AdditionalOptions': [ '-std:c++17' ]
}
}
}],
[ 'OS=="linux"', {
'cflags_cc': [
'-std=c++17',
'<!(pkg-config x11 --cflags-only-I)',
'<!(pkg-config xtst --cflags-only-I)',
'<!(pkg-config atspi-2 --cflags-only-I)',
'<!(pkg-config glib-2.0 --cflags-only-I)',
'<!(pkg-config gobject-2.0 --cflags-only-I)',
],
'sources': [
'keyboard-auto-type/keyboard-auto-type/src/linux/atspi-helpers.cpp',
'keyboard-auto-type/keyboard-auto-type/src/linux/auto-type-linux.cpp',
'keyboard-auto-type/keyboard-auto-type/src/linux/key-map.cpp',
'keyboard-auto-type/keyboard-auto-type/src/linux/x11-helpers.cpp',
'keyboard-auto-type/keyboard-auto-type/src/linux/x11-keysym-map.cpp',
],
'libraries': [
'<!(pkg-config x11 --libs)',
'<!(pkg-config xtst --libs)',
'<!(pkg-config atspi-2 --libs)',
'<!(pkg-config glib-2.0 --libs)',
'<!(pkg-config gobject-2.0 --libs)',
]
}]
]
}
]
}