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
|
{
'includes': [ 'common.gypi' ],
'targets': [
{
'target_name': 'make_vector_tile',
'hard_dependency': 1,
'type': 'none',
'actions': [
{
'action_name': 'generate_setting',
'inputs': [
'gen_settings.py'
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/mapnik_settings.js'
],
'action': ['python', 'gen_settings.py', '<(SHARED_INTERMEDIATE_DIR)/mapnik_settings.js']
}
],
'copies': [
{
'files': [ '<(SHARED_INTERMEDIATE_DIR)/mapnik_settings.js' ],
'destination': '<(module_path)'
}
]
},
{
'target_name': '<(module_name)',
'dependencies': [ 'make_vector_tile' ],
'sources': [
"src/mapnik_logger.cpp",
"src/node_mapnik.cpp",
"src/blend.cpp",
"src/mapnik_map.cpp",
"src/mapnik_color.cpp",
"src/mapnik_geometry.cpp",
"src/mapnik_feature.cpp",
"src/mapnik_image.cpp",
"src/mapnik_image_view.cpp",
"src/mapnik_grid.cpp",
"src/mapnik_grid_view.cpp",
"src/mapnik_memory_datasource.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",
"deps/clipper/clipper.cpp"
],
"msvs_disabled_warnings": [
4267
],
'include_dirs': [
'./deps/clipper/',
'./src',
"<!(nodejs -e \"require('nan')\")",
'/usr/include'
],
'defines': [
'MAPNIK_GIT_REVISION="<!@(mapnik-config --git-describe)"',
'CLIPPER_INTPOINT_IMPL=mapnik::geometry::point<cInt>',
'CLIPPER_PATH_IMPL=mapnik::geometry::line_string<cInt>',
'CLIPPER_PATHS_IMPL=mapnik::geometry::multi_line_string<cInt>',
'CLIPPER_IMPL_INCLUDE=<mapnik/geometry.hpp>'
],
'conditions': [
['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)',
],
'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':'10.8',
'CLANG_CXX_LIBRARY': 'libc++',
'CLANG_CXX_LANGUAGE_STANDARD':'c++11',
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0'
}
},
]
]
},
{
'target_name': 'action_after_build',
'type': 'none',
'dependencies': [ '<(module_name)' ],
'copies': [
{
'files': [ '<(PRODUCT_DIR)/<(module_name).node' ],
'destination': '<(module_path)'
}
]
}
]
}
|