forked from Robot/robot-js
-
Notifications
You must be signed in to change notification settings - Fork 7
/
binding.gyp
98 lines (94 loc) · 2.6 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
{
"variables": { "module_name%": "robot" },
"configurations": {
"Debug": { "defines": ["DEBUG"] },
"Release": { "defines": ["NDEBUG"] },
},
"targets": [
{
"target_name": "<(module_name)",
"sources": [
"src/robot/Source/Hash.cc",
"src/robot/Source/Color.cc",
"src/robot/Source/Image.cc",
"src/robot/Source/Range.cc",
"src/robot/Source/Point.cc",
"src/robot/Source/Size.cc",
"src/robot/Source/Bounds.cc",
"src/robot/Source/Keyboard.cc",
"src/robot/Source/Mouse.cc",
"src/robot/Source/Process.cc",
"src/robot/Source/Module.cc",
"src/robot/Source/Memory.cc",
"src/robot/Source/Window.cc",
"src/robot/Source/Screen.cc",
"src/robot/Source/Timer.cc",
"src/robot/Source/Clipboard.cc",
"src/NodeRobot.cc",
"src/NodeImage.cc",
"src/NodeKeyboard.cc",
"src/NodeMouse.cc",
"src/NodeProcess.cc",
"src/NodeMemory.cc",
"src/NodeWindow.cc",
"src/NodeScreen.cc",
"src/NodeClipboard.cc"
],
"include_dirs": ["src/robot/Source/", "<!(node -e \"require('nan')\")"],
"conditions": [
[ "OS == 'linux'", {
"libraries": ["-lrt", "-lX11", "-lXtst", "-lXinerama"],
"cflags_cc": [
"-std=c++11",
"-fexceptions",
"-Wno-strict-aliasing",
"-Wno-implicit-fallthrough",
"-Wno-unused-variable",
"-Wno-missing-field-initializers"
],
"cflags_cc!": [
"-std=gnu++0x",
"-fno-exceptions"
]
}],
[ "OS == 'mac'", {
"libraries": ["-framework ApplicationServices", "-framework AppKit"],
"xcode_settings": {
"MACOSX_DEPLOYMENT_TARGET": "10.8",
"CLANG_CXX_LANGUAGE_STANDARD": "c++11",
"CLANG_CXX_LIBRARY": "libc++",
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
"GCC_VERSION": "com.apple.compilers.llvm.clang.1_0",
"OTHER_CPLUSPLUSFLAGS": [
"-ObjC++",
"-Wno-sign-compare",
"-Wno-unused-variable",
"-Wno-missing-field-initializers"
]
}
}],
[ "OS == 'win'", {
"libraries": ["-lPsapi"],
"sources": ["src/NodeRobot.rc"],
"defines": ["UNICODE"],
"defines!": ["_HAS_EXCEPTIONS=0"],
"msvs_settings": {
"VCCLCompilerTool": { "ExceptionHandling": 1 },
"VCLinkerTool": { "SubSystem": 2 }
},
"msvs_disabled_warnings": [ 4005, 4661 ],
}]
]
},
{
"target_name": "copy_binary",
"type": "none",
"dependencies": [ "<(module_name)" ],
"copies": [{
"files": ["<(PRODUCT_DIR)/<@(_dependencies).node"],
"destination": "<(module_path)",
"conditions": [["OS == 'win'", { "files": ["<(PRODUCT_DIR)/<@(_dependencies).pdb"] }]]
}]
}
]
}