-
Notifications
You must be signed in to change notification settings - Fork 4
/
binding.gyp
98 lines (87 loc) · 2.56 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
{
"targets": [
{
"target_name": "monkey_opencv",
"sources": [
"src/addon.cc",
"src/template_matcher.cc",
"src/addon.cc",
"src/find_sub_image.cc",
"src/matrix.cc",
"src/opencv.cc",
"src/constants.cc",
],
"include_dirs": [ "<!(node -e \"require('nan')\")" ],
# For windows
"include_dirs": [
"<!@(node utils/find-opencv.js --cflags)",
"<!(node -e \"require('nan')\")"
],
"cflags!" : [ "-fno-exceptions"],
"cflags_cc!": [ "-fno-rtti", "-fno-exceptions"],
"conditions": [
[ "OS==\"linux\" or OS==\"freebsd\" or OS==\"openbsd\" or OS==\"solaris\" or OS==\"aix\"", {
"libraries": [
"<!@(node utils/find-opencv.js --libs)",
],
"cflags": [
"<!@(node utils/find-opencv.js --cflags)",
"-Wall"
]
}],
[ "OS==\"win\"", {
"libraries": [
"<!@(node utils/find-opencv.js --libs)",
],
"cflags": [
"-Wall"
],
"defines": [
"WIN"
],
"msvs_settings": {
"VCCLCompilerTool": {
"ExceptionHandling": "2",
"DisableSpecificWarnings": [ "4530", "4506", "4244" ],
},
}
}],
[ # cflags on OS X are stupid and have to be defined like this
"OS==\"mac\"", {
"libraries": [
"<!@(node utils/find-opencv.js --libs | sed -e \"s/-l-framework/-framework/g\")",
],
"xcode_settings": {
"OTHER_CFLAGS": [
"-mmacosx-version-min=10.7",
"-std=c++11",
"-stdlib=libc++",
"<!@(node utils/find-opencv.js --cflags)",
],
#"OTHER_LDFLAGS":[
# "-Wl,-bind_at_load"
#],
"GCC_ENABLE_CPP_RTTI": "YES",
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
"MACOSX_DEPLOYMENT_TARGET":"10.8",
"CLANG_CXX_LIBRARY": "libc++",
"CLANG_CXX_LANGUAGE_STANDARD":"c++11",
"GCC_VERSION": "com.apple.compilers.llvm.clang.1_0"
},
}
]
]
},
{
"target_name": "action_after_build",
"type": "none",
"dependencies": [ "<(module_name)" ],
"copies": [
{
"files": [ "<(PRODUCT_DIR)/<(module_name).node" ],
"destination": "<(module_path)"
}
]
}
]
}