-
Notifications
You must be signed in to change notification settings - Fork 19
/
binding.gyp
170 lines (165 loc) · 7.36 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
{
# NOTE: 'module_name' and 'module_path' come from the 'binary' property in package.json
# node-pre-gyp handles passing them down to node-gyp when you build from source
"targets": [{
"target_name": "<(module_name)",
"sources": [
"./src/s2.cc",
"./src/builder.cc",
"./src/cell.cc",
"./src/cell_id.cc",
"./src/earth.cc",
"./src/latlng.cc",
"./src/loop.cc",
"./src/point.cc",
"./src/polygon.cc",
"./src/polyline.cc",
"./src/region_coverer.cc",
"./src/cell_union.cc",
"./third_party/s2geometry/src/s2/base/stringprintf.cc",
"./third_party/s2geometry/src/s2/third_party/absl/strings/ascii.cc",
"./third_party/s2geometry/src/s2/util/coding/coder.cc",
"./third_party/s2geometry/src/s2/util/math/exactfloat/exactfloat.cc",
"./third_party/s2geometry/src/s2/encoded_s2cell_id_vector.cc",
"./third_party/s2geometry/src/s2/encoded_s2point_vector.cc",
"./third_party/s2geometry/src/s2/encoded_s2shape_index.cc",
"./third_party/s2geometry/src/s2/encoded_string_vector.cc",
"./third_party/s2geometry/src/s2/id_set_lexicon.cc",
"./third_party/s2geometry/src/s2/mutable_s2shape_index.cc",
"./third_party/s2geometry/src/s2/r2rect.cc",
"./third_party/s2geometry/src/s2/s1angle.cc",
"./third_party/s2geometry/src/s2/s1chord_angle.cc",
"./third_party/s2geometry/src/s2/s1interval.cc",
"./third_party/s2geometry/src/s2/s2boolean_operation.cc",
"./third_party/s2geometry/src/s2/s2builder.cc",
"./third_party/s2geometry/src/s2/s2builder_graph.cc",
"./third_party/s2geometry/src/s2/s2builderutil_closed_set_normalizer.cc",
"./third_party/s2geometry/src/s2/s2builderutil_find_polygon_degeneracies.cc",
"./third_party/s2geometry/src/s2/s2builderutil_lax_polygon_layer.cc",
"./third_party/s2geometry/src/s2/s2builderutil_s2point_vector_layer.cc",
"./third_party/s2geometry/src/s2/s2builderutil_s2polygon_layer.cc",
"./third_party/s2geometry/src/s2/s2builderutil_s2polyline_layer.cc",
"./third_party/s2geometry/src/s2/s2builderutil_s2polyline_vector_layer.cc",
"./third_party/s2geometry/src/s2/s2builderutil_snap_functions.cc",
"./third_party/s2geometry/src/s2/s2cap.cc",
"./third_party/s2geometry/src/s2/s2cell.cc",
"./third_party/s2geometry/src/s2/s2cell_id.cc",
"./third_party/s2geometry/src/s2/s2cell_index.cc",
"./third_party/s2geometry/src/s2/s2cell_union.cc",
"./third_party/s2geometry/src/s2/s2centroids.cc",
"./third_party/s2geometry/src/s2/s2closest_cell_query.cc",
"./third_party/s2geometry/src/s2/s2closest_edge_query.cc",
"./third_party/s2geometry/src/s2/s2closest_point_query.cc",
"./third_party/s2geometry/src/s2/s2contains_vertex_query.cc",
"./third_party/s2geometry/src/s2/s2convex_hull_query.cc",
"./third_party/s2geometry/src/s2/s2coords.cc",
"./third_party/s2geometry/src/s2/s2crossing_edge_query.cc",
"./third_party/s2geometry/src/s2/s2debug.cc",
"./third_party/s2geometry/src/s2/s2earth.cc",
"./third_party/s2geometry/src/s2/s2edge_clipping.cc",
"./third_party/s2geometry/src/s2/s2edge_crosser.cc",
"./third_party/s2geometry/src/s2/s2edge_crossings.cc",
"./third_party/s2geometry/src/s2/s2edge_distances.cc",
"./third_party/s2geometry/src/s2/s2edge_tessellator.cc",
"./third_party/s2geometry/src/s2/s2error.cc",
"./third_party/s2geometry/src/s2/s2furthest_edge_query.cc",
"./third_party/s2geometry/src/s2/s2latlng.cc",
"./third_party/s2geometry/src/s2/s2latlng_rect.cc",
"./third_party/s2geometry/src/s2/s2latlng_rect_bounder.cc",
"./third_party/s2geometry/src/s2/s2lax_loop_shape.cc",
"./third_party/s2geometry/src/s2/s2lax_polygon_shape.cc",
"./third_party/s2geometry/src/s2/s2lax_polyline_shape.cc",
"./third_party/s2geometry/src/s2/s2loop.cc",
"./third_party/s2geometry/src/s2/s2loop_measures.cc",
"./third_party/s2geometry/src/s2/s2max_distance_targets.cc",
"./third_party/s2geometry/src/s2/s2measures.cc",
"./third_party/s2geometry/src/s2/s2metrics.cc",
"./third_party/s2geometry/src/s2/s2min_distance_targets.cc",
"./third_party/s2geometry/src/s2/s2padded_cell.cc",
"./third_party/s2geometry/src/s2/s2point_compression.cc",
"./third_party/s2geometry/src/s2/s2point_region.cc",
"./third_party/s2geometry/src/s2/s2pointutil.cc",
"./third_party/s2geometry/src/s2/s2polygon.cc",
"./third_party/s2geometry/src/s2/s2polyline.cc",
"./third_party/s2geometry/src/s2/s2polyline_alignment.cc",
"./third_party/s2geometry/src/s2/s2polyline_measures.cc",
"./third_party/s2geometry/src/s2/s2polyline_simplifier.cc",
"./third_party/s2geometry/src/s2/s2predicates.cc",
"./third_party/s2geometry/src/s2/s2projections.cc",
"./third_party/s2geometry/src/s2/s2r2rect.cc",
"./third_party/s2geometry/src/s2/s2region.cc",
"./third_party/s2geometry/src/s2/s2region_coverer.cc",
"./third_party/s2geometry/src/s2/s2region_intersection.cc",
"./third_party/s2geometry/src/s2/s2region_term_indexer.cc",
"./third_party/s2geometry/src/s2/s2region_union.cc",
"./third_party/s2geometry/src/s2/s2shape_index.cc",
"./third_party/s2geometry/src/s2/s2shape_index_buffered_region.cc",
"./third_party/s2geometry/src/s2/s2shape_index_measures.cc",
"./third_party/s2geometry/src/s2/s2shape_measures.cc",
"./third_party/s2geometry/src/s2/s2shapeutil_build_polygon_boundaries.cc",
"./third_party/s2geometry/src/s2/s2shapeutil_coding.cc",
"./third_party/s2geometry/src/s2/s2shapeutil_contains_brute_force.cc",
"./third_party/s2geometry/src/s2/s2shapeutil_edge_iterator.cc",
"./third_party/s2geometry/src/s2/s2shapeutil_get_reference_point.cc",
"./third_party/s2geometry/src/s2/s2shapeutil_range_iterator.cc",
"./third_party/s2geometry/src/s2/s2shapeutil_visit_crossing_edge_pairs.cc",
"./third_party/s2geometry/src/s2/s2text_format.cc",
"./third_party/s2geometry/src/s2/s2wedge_relations.cc",
],
"defines": [
"NAPI_CPP_EXCEPTIONS",
"NAPI_EXPERIMENTAL", # required for bigint
"NDEBUG",
"NODE_ADDON_API_DISABLE_DEPRECATED"
],
"include_dirs": [
"<!@(node -p \"require('node-addon-api').include\")",
"./third_party/s2geometry/src"
],
'conditions': [
['OS=="linux"', {
'cflags!': [ '-fno-exceptions' ],
'cflags_cc!': [ '-fno-exceptions' ],
'cflags': [
'-Wno-sign-compare',
'-Wno-type-limits',
'-Wno-comment',
'-Wno-bool-compare',
'-Wno-extra',
],
"cflags+": [
"-std=c++11"
],
"cflags_c+": [
"-std=c++14"
],
"cflags_cc+": [
"-std=c++14"
],
}],
['OS=="mac"', {
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'OTHER_CPLUSPLUSFLAGS':[
'-Wno-unused-private-field',
'-Wno-sign-compare',
'-stdlib=libc++',
'-std=c++14',
],
},
}]
]
},
{
"target_name": "action_after_build",
"type": "none",
"dependencies": [ "<(module_name)" ],
"copies": [
{
"files": [ "<(PRODUCT_DIR)/<(module_name).node" ],
"destination": "<(module_path)"
}
]
}
]
}