-
Notifications
You must be signed in to change notification settings - Fork 0
/
binding.gyp
81 lines (80 loc) · 1.63 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
{
"targets": [
{
"target_name": "controlr",
"type": "executable",
"sources": [
"src/controlr.cc",
"src/rinterface_common.cc",
"src/JSON.cc"
],
"libraries!": [
'-l"<(node_root_dir)/$(ConfigurationName)/<(node_lib_file)"'
],
"library_dirs" : [
"./lib"
],
"include_dirs" : [
"./include/"
],
'conditions': [
['OS=="linux"', {
"cflags": [
'<!@(R CMD config --cppflags)'
],
"sources": [
"src/rinterface_linux.cc"
],
"libraries": [
'-lR', '../lib/libuv.a'
],
"library_dirs" : [
],
"include_dirs" : [
],
"ldflags" : [
'<!@(R CMD config --ldflags)', '<!(echo $LDFLAGS)'
]
}],
['OS=="mac"', {
"sources": [
"src/rinterface_linux.cc"
],
"libraries": [
'-lR', '-lRblas', '../lib/osx/libuv.a'
],
"library_dirs!" : [
"./lib"
],
"library_dirs" : [
'<!@(Rscript -e "cat(R.home())")/lib',
],
"ldflags" : [
'<!@(R CMD config --ldflags)'
],
"xcode_settings": {
'MACOSX_DEPLOYMENT_TARGET': '10.11',
'OTHER_CFLAGS': ["-std=c++11", "-stdlib=libc++", "-fexceptions", '<!@(R CMD config --cppflags)']
}
}],
['OS=="win"', {
"sources": [
"src/rinterface_win.cc"
],
"library_dirs" : [
],
"include_dirs" : [
'<!@(Rscript -e "cat(R.home())")/include',
],
"copies": [{
"destination": "build/Release",
"files": [ "bin/libuv.dll" ]
}],
"libraries": [
"R64.lib", "RGraphApp64.lib", "-llibuv"
],
}]
]
}
]
}