-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinding.gyp
94 lines (92 loc) · 2.62 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
{
"variables": {
"cflags_cc": [
"-Wall",
# "-Werror",
"-O3",
"-fexceptions", # Boost on Linux wants this
"-frtti" # And this too.
],
"include_dirs": [
"./node_modules/nan",
"<!(echo ${BOOST_ROOT})"
],
# "libraries": [
# "<!(echo ${BOOST_LIBRARYDIR}/libboost_filesystem.dylib)"
# ],
"OTHER_CFLAGS": [ # for Mac builds
"-Wno-unused-local-typedefs"
]
},
"conditions": [
[
"OS=='win'", {
"variables": {
"include_dirs": [
"<!(echo %BOOST_ROOT%)"
]
}
}
],
[
"OS=='mac'", {
"variables": {
"include_dirs": [
"<!(echo ${BOOST_ROOT})"
],
"libraries": [
"<!(echo ${BOOST_LIBRARYDIR})/libboost_filesystem.dylib",
]
}
}
],
[
"OS=='linux'", {
"variables": {
"include_dirs": [
"<!(echo ${BOOST_ROOT})"
],
"libraries": [
"<!(echo ${BOOST_LIBRARYDIR})/libboost_filesystem.so"
]
}
}
],
],
"targets": [
{
"target_name": "<(module_name)",
"sources": ["shared-file-view.cc"],
"cflags_cc": ["<@(cflags_cc)"],
"include_dirs": ["<@(include_dirs)"],
"libraries": ["<@(libraries)"],
"xcode_settings": {
"MACOSX_DEPLOYMENT_TARGET": "12.0",
"OTHER_CFLAGS": [
"<@(OTHER_CFLAGS)",
"-stdlib=libc++"
],
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
"GCC_ENABLE_CPP_RTTI": "-frtti"
},
"msvs_settings": {
"VCLinkerTool": {
"AdditionalLibraryDirectories": [
"<!(echo %BOOST_ROOT%/stage/lib)"
]
}
}
},
{
"target_name": "action_after_build",
"type": "none",
"dependencies": ["<(module_name)"],
"copies": [
{
"files": ["<(PRODUCT_DIR)/<(module_name).node"],
"destination": "<(module_path)"
}
]
}
]
}