-
Notifications
You must be signed in to change notification settings - Fork 165
/
binding.gyp
148 lines (148 loc) · 5.1 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
{
'includes': [ 'common.gypi' ],
'variables': {
'ENABLE_GLIBC_WORKAROUND%':'false', # can be overriden by a command line variable because of the % sign
},
'targets': [
{
'target_name': 'mapnik',
'sources': [
"src/mapnik_logger.cpp",
"src/node_mapnik.cpp",
"src/blend.cpp",
"src/mapnik_map.cpp",
"src/mapnik_map_load.cpp",
"src/mapnik_map_from_string.cpp",
"src/mapnik_map_render.cpp",
"src/mapnik_map_query_point.cpp",
"src/mapnik_color.cpp",
"src/mapnik_geometry.cpp",
"src/mapnik_feature.cpp",
"src/mapnik_image.cpp",
"src/mapnik_image_encode.cpp",
"src/mapnik_image_open.cpp",
"src/mapnik_image_fill.cpp",
"src/mapnik_image_save.cpp",
"src/mapnik_image_from_bytes.cpp",
"src/mapnik_image_from_svg.cpp",
"src/mapnik_image_solid.cpp",
"src/mapnik_image_multiply.cpp",
"src/mapnik_image_clear.cpp",
"src/mapnik_image_copy.cpp",
"src/mapnik_image_resize.cpp",
"src/mapnik_image_compositing.cpp",
"src/mapnik_image_filter.cpp",
"src/mapnik_image_view.cpp",
"src/mapnik_grid.cpp",
"src/mapnik_grid_view.cpp",
"src/mapnik_palette.cpp",
"src/mapnik_projection.cpp",
"src/mapnik_layer.cpp",
"src/mapnik_datasource.cpp",
"src/mapnik_featureset.cpp",
"src/mapnik_expression.cpp",
"src/mapnik_cairo_surface.cpp",
"src/mapnik_vector_tile.cpp",
"src/mapnik_vector_tile_data.cpp",
"src/mapnik_vector_tile_query.cpp",
"src/mapnik_vector_tile_json.cpp",
"src/mapnik_vector_tile_info.cpp",
"src/mapnik_vector_tile_simple_valid.cpp",
"src/mapnik_vector_tile_render.cpp",
"src/mapnik_vector_tile_clear.cpp",
"src/mapnik_vector_tile_image.cpp",
"src/mapnik_vector_tile_composite.cpp",
"deps/mapnik-vector-tile/src/vector_tile_compression.cpp",
"deps/mapnik-vector-tile/src/vector_tile_datasource_pbf.cpp",
"deps/mapnik-vector-tile/src/vector_tile_featureset_pbf.cpp",
"deps/mapnik-vector-tile/src/vector_tile_geometry_decoder.cpp",
"deps/mapnik-vector-tile/src/vector_tile_geometry_encoder_pbf.cpp",
"deps/mapnik-vector-tile/src/vector_tile_layer.cpp",
"deps/mapnik-vector-tile/src/vector_tile_processor.cpp",
"deps/mapnik-vector-tile/src/vector_tile_raster_clipper.cpp",
"deps/mapnik-vector-tile/src/vector_tile_tile.cpp"
],
'include_dirs': [
'./src',
"<!@(node -p \"require('node-addon-api').include\")",
"./deps/geometry/include/",
"./deps/protozero/include/",
"./deps/wagyu/include/",
"./deps/mapnik-vector-tile/src"
],
'defines': [
'MAPNIK_GIT_REVISION="<!@(mapnik-config --git-describe)"',
'MAPNIK_VECTOR_TILE_LIBRARY=1',
],
'conditions': [
['"<!@(uname -p)"=="x86_64"',{
'defines' : [ 'SSE_MATH' ]
}],
['ENABLE_GLIBC_WORKAROUND != "false"', {
'sources': [
"src/glibc_workaround.cpp"
]
}],
['OS=="win"',
{
'include_dirs':[
'<!@(mapnik-config --includes)',
'<!@(mapnik-config --dep-includes)'
],
'defines': ['NOMINMAX','<!@(mapnik-config --defines)'],
'defines!': ["_HAS_EXCEPTIONS=0"],
'libraries': [
'<!@(mapnik-config --libs)',
'mapnik-wkt.lib',
'mapnik-json.lib',
'<!@(mapnik-config --dep-libs)',
],
'msvs_disabled_warnings': [ 4244,4005,4506,4345,4804,4805 ],
'msvs_settings': {
'VCLinkerTool': {
'AdditionalLibraryDirectories': [
'<!@(mapnik-config --ldflags)'
],
},
}
},
{
'cflags_cc!': ['-fno-rtti', '-fno-exceptions'],
'cflags_cc' : [
'<!@(mapnik-config --cflags)',
],
'libraries':[
'<!@(mapnik-config --libs)',
'-lmapnik-wkt',
'-lmapnik-json',
'<!@(mapnik-config --ldflags)',
'<!@(mapnik-config --dep-libs)'
],
'ldflags': [
'-Wl,-z,now',
"-Wl,-z,origin",
"-Wl,-rpath=\\$$ORIGIN/lib"
],
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS':[
'<!@(mapnik-config --cflags)',
],
'OTHER_CFLAGS':[
'<!@(mapnik-config --cflags)'
],
'OTHER_LDFLAGS':[
'-Wl,-bind_at_load'
],
'GCC_ENABLE_CPP_RTTI': 'YES',
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
'MACOSX_DEPLOYMENT_TARGET':'11',
'CLANG_CXX_LIBRARY': 'libc++',
'CLANG_CXX_LANGUAGE_STANDARD':'c++20',
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0'
}
},
]
]
},
]
}