This repository has been archived by the owner on Jul 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathbinding.gyp
58 lines (55 loc) · 1.51 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
{
"variables": {
'gpu%': '<!(echo $DARKNET_BUILD_WITH_GPU)',
'cudnn%': '<!(echo $DARKNET_BUILD_WITH_CUDNN)',
'openmp%': '<!(echo $DARKNET_BUILD_WITH_OPENMP)',
},
"targets": [{
"target_name": "darknet",
"cflags!": [ "-fno-exceptions" ],
"cflags_cc!": [ "-fno-exceptions" ],
"conditions": [
[ 'gpu==1', {
'defines': [
'GPU'
],
'include_dirs': [
'/usr/local/cuda/include/'
],
'libraries': [
'-L/usr/local/cuda/lib64 -lcuda -lcudart -lcublas -lcurand'
],
} ],
[ 'cudnn==1', {
'defines': [
'CUDNN'
],
'libraries': [
'-lcudnn'
]
}],
[ 'openmp==1', {
'libraries': [
'-fopenmp'
]
}]
],
"sources": [
"cppsrc/main.cpp",
"cppsrc/detector.cpp"
],
'include_dirs': [
"<!@(node -p \"require('node-addon-api').include\")",
"darknet/include/",
],
'libraries': [
"<(module_root_dir)/darknet/libdarknet.so"
],
'dependencies': [
"<!(node -p \"require('node-addon-api').gyp\")"
],
'defines': [
'NAPI_DISABLE_CPP_EXCEPTIONS',
]
}]
}