add options for grid/svg renderer
This commit is contained in:
parent
3eb00b9794
commit
0eb0408cc3
3 changed files with 173 additions and 38 deletions
|
@ -14,13 +14,15 @@ option(USE_EXTERNAL_MAPBOX_GEOMETRY "Use a external mapnik/geometry.hpp. If off,
|
||||||
option(USE_EXTERNAL_MAPBOX_POLYLABEL "Use a external mapnik/polylabel. If off, use the submodule" OFF)
|
option(USE_EXTERNAL_MAPBOX_POLYLABEL "Use a external mapnik/polylabel. If off, use the submodule" OFF)
|
||||||
option(USE_EXTERNAL_MAPBOX_PROTOZERO "Use a external mapnik/protozero. If off, use the submodule" OFF)
|
option(USE_EXTERNAL_MAPBOX_PROTOZERO "Use a external mapnik/protozero. If off, use the submodule" OFF)
|
||||||
option(USE_EXTERNAL_MAPBOX_VARIANT "Use a external mapnik/variant. If off, use the submodule" OFF)
|
option(USE_EXTERNAL_MAPBOX_VARIANT "Use a external mapnik/variant. If off, use the submodule" OFF)
|
||||||
option(USE_JPEG "Adds jpeg support" ON)
|
option(USE_JPEG "adds jpeg support" ON)
|
||||||
option(USE_PNG "Adds png support" ON)
|
option(USE_PNG "adds png support" ON)
|
||||||
option(USE_TIFF "Adds tiff support" ON)
|
option(USE_TIFF "adds tiff support" ON)
|
||||||
option(USE_WEBP "Adds webp support" ON)
|
option(USE_WEBP "adds webp support" ON)
|
||||||
option(USE_LIBXML2 "Adds libxml2 support" ON)
|
option(USE_LIBXML2 "adds libxml2 support" ON)
|
||||||
option(USE_CAIRO "Adds the cairo renderer" ON)
|
option(USE_CAIRO "adds the cairo renderer" ON)
|
||||||
option(USE_PROJ4 "adds proj4 support" ON)
|
option(USE_PROJ4 "adds proj4 support" ON)
|
||||||
|
option(USE_GRID_RENDERER "adds grid renderer" ON)
|
||||||
|
option(USE_SVG_RENDERER "adds grid renderer" ON)
|
||||||
|
|
||||||
option(USE_PLUGIN_INPUT_CSV "adds plugin input csv" ON)
|
option(USE_PLUGIN_INPUT_CSV "adds plugin input csv" ON)
|
||||||
option(USE_PLUGIN_INPUT_GDAL "adds plugin input gdal" ON)
|
option(USE_PLUGIN_INPUT_GDAL "adds plugin input gdal" ON)
|
||||||
|
@ -164,6 +166,16 @@ if(USE_PROJ4)
|
||||||
list(APPEND MAPNIK_OPTIONAL_LIBS proj)
|
list(APPEND MAPNIK_OPTIONAL_LIBS proj)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(USE_GRID_RENDERER)
|
||||||
|
message(STATUS "Using grid renderer")
|
||||||
|
list(APPEND MAPNIK_COMPILE_DEFS GRID_RENDERER)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(USE_SVG_RENDERER)
|
||||||
|
message(STATUS "Using svg renderer")
|
||||||
|
list(APPEND MAPNIK_COMPILE_DEFS SVG_RENDERER)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_library(headers INTERFACE)
|
add_library(headers INTERFACE)
|
||||||
add_library(mapnik::headers ALIAS headers)
|
add_library(mapnik::headers ALIAS headers)
|
||||||
|
|
||||||
|
|
|
@ -180,6 +180,8 @@ set(GEOMETRY_SRC
|
||||||
)
|
)
|
||||||
list(APPEND COMPILE_SRC ${GEOMETRY_SRC})
|
list(APPEND COMPILE_SRC ${GEOMETRY_SRC})
|
||||||
|
|
||||||
|
if(USE_GRID_RENDERER)
|
||||||
|
message(STATUS "adding grid renderer to compilation")
|
||||||
set(GRID_SRC
|
set(GRID_SRC
|
||||||
grid/grid_renderer.cpp
|
grid/grid_renderer.cpp
|
||||||
grid/grid.cpp
|
grid/grid.cpp
|
||||||
|
@ -196,6 +198,7 @@ set(GRID_SRC
|
||||||
grid/process_text_symbolizer.cpp
|
grid/process_text_symbolizer.cpp
|
||||||
)
|
)
|
||||||
list(APPEND COMPILE_SRC ${GRID_SRC})
|
list(APPEND COMPILE_SRC ${GRID_SRC})
|
||||||
|
endif()
|
||||||
|
|
||||||
set(GROUP_SRC
|
set(GROUP_SRC
|
||||||
group/group_layout_manager.cpp
|
group/group_layout_manager.cpp
|
||||||
|
@ -213,6 +216,8 @@ set(RENDERER_COMMON_SRC
|
||||||
)
|
)
|
||||||
list(APPEND COMPILE_SRC ${RENDERER_COMMON_SRC})
|
list(APPEND COMPILE_SRC ${RENDERER_COMMON_SRC})
|
||||||
|
|
||||||
|
if(USE_SVG_RENDERER)
|
||||||
|
message(STATUS "adding svg renderer to compilation")
|
||||||
set(SVG_SRC
|
set(SVG_SRC
|
||||||
svg/svg_parser.cpp
|
svg/svg_parser.cpp
|
||||||
svg/svg_path_grammar_x3.cpp
|
svg/svg_path_grammar_x3.cpp
|
||||||
|
@ -229,6 +234,7 @@ set(SVG_SRC
|
||||||
svg/output/svg_renderer.cpp
|
svg/output/svg_renderer.cpp
|
||||||
)
|
)
|
||||||
list(APPEND COMPILE_SRC ${SVG_SRC})
|
list(APPEND COMPILE_SRC ${SVG_SRC})
|
||||||
|
endif()
|
||||||
|
|
||||||
set(TEXT_SRC
|
set(TEXT_SRC
|
||||||
text/color_font_renderer.cpp
|
text/color_font_renderer.cpp
|
||||||
|
|
|
@ -16,6 +16,85 @@ target_include_directories(Catch INTERFACE ${CATCH_INCLUDE_DIR})
|
||||||
add_executable(mapnik-test-unit
|
add_executable(mapnik-test-unit
|
||||||
unit/run.cpp
|
unit/run.cpp
|
||||||
unit/color/css_color.cpp
|
unit/color/css_color.cpp
|
||||||
|
unit/core/box2d_test.cpp
|
||||||
|
unit/core/comparison_test.cpp
|
||||||
|
unit/core/conversions_test.cpp
|
||||||
|
unit/core/copy_move_test.cpp
|
||||||
|
unit/core/exceptions_test.cpp
|
||||||
|
unit/core/expressions_test.cpp
|
||||||
|
unit/core/params_test.cpp
|
||||||
|
unit/core/transform_expressions_test.cpp
|
||||||
|
unit/core/value_test.cpp
|
||||||
|
unit/datasource/csv.cpp
|
||||||
|
unit/datasource/gdal.cpp
|
||||||
|
unit/datasource/geobuf.cpp
|
||||||
|
unit/datasource/geojson.cpp
|
||||||
|
unit/datasource/memory.cpp
|
||||||
|
unit/datasource/ogr.cpp
|
||||||
|
unit/datasource/postgis.cpp
|
||||||
|
unit/datasource/shapeindex.cpp
|
||||||
|
unit/datasource/spatial_index.cpp
|
||||||
|
unit/datasource/topojson.cpp
|
||||||
|
unit/font/fontset_runtime_test.cpp
|
||||||
|
unit/geometry/centroid.cpp
|
||||||
|
unit/geometry/closest_point.cpp
|
||||||
|
unit/geometry/geometry.cpp
|
||||||
|
unit/geometry/geometry_envelope_test.cpp
|
||||||
|
unit/geometry/geometry_hit_test.cpp
|
||||||
|
unit/geometry/geometry_is_simple.cpp
|
||||||
|
unit/geometry/geometry_is_valid.cpp
|
||||||
|
unit/geometry/geometry_reprojection.cpp
|
||||||
|
unit/geometry/geometry_strategy_test.cpp
|
||||||
|
unit/geometry/geometry_test_helper.cpp
|
||||||
|
unit/geometry/grid_vertex_converter.cpp
|
||||||
|
unit/geometry/interior.cpp
|
||||||
|
unit/geometry/is_clockwise.cpp
|
||||||
|
unit/geometry/is_empty.cpp
|
||||||
|
unit/geometry/polygon_vertex_processor.cpp
|
||||||
|
unit/geometry/polylabel.cpp
|
||||||
|
unit/geometry/remove_empty.cpp
|
||||||
|
unit/imaging/image.cpp
|
||||||
|
unit/imaging/image_apply_opacity.cpp
|
||||||
|
unit/imaging/image_filter.cpp
|
||||||
|
unit/imaging/image_io_test.cpp
|
||||||
|
unit/imaging/image_is_solid.cpp
|
||||||
|
unit/imaging/image_painted_test.cpp
|
||||||
|
unit/imaging/image_premultiply.cpp
|
||||||
|
unit/imaging/image_set_pixel.cpp
|
||||||
|
unit/imaging/image_view.cpp
|
||||||
|
unit/imaging/tiff_io.cpp
|
||||||
|
unit/imaging/webp_io.cpp
|
||||||
|
unit/map/background.cpp
|
||||||
|
unit/numerics/enumeration.cpp
|
||||||
|
unit/numerics/safe_cast.cpp
|
||||||
|
unit/pixel/agg_blend_src_over_test.cpp
|
||||||
|
unit/pixel/palette.cpp
|
||||||
|
unit/projection/proj_transform.cpp
|
||||||
|
unit/renderer/buffer_size_scale_factor.cpp
|
||||||
|
unit/renderer/cairo_io.cpp
|
||||||
|
unit/renderer/feature_style_processor.cpp
|
||||||
|
unit/serialization/wkb_formats_test.cpp
|
||||||
|
unit/serialization/wkb_test.cpp
|
||||||
|
unit/serialization/xml_parser_trim.cpp
|
||||||
|
unit/sql/sql_parse.cpp
|
||||||
|
unit/svg/svg_parser_test.cpp
|
||||||
|
unit/svg/svg_path_parser_test.cpp
|
||||||
|
unit/svg/svg_renderer_test.cpp
|
||||||
|
unit/symbolizer/marker_placement_vertex_last.cpp
|
||||||
|
unit/symbolizer/markers_point_placement.cpp
|
||||||
|
unit/symbolizer/symbolizer_test.cpp
|
||||||
|
unit/text/script_runs.cpp
|
||||||
|
unit/text/shaping.cpp
|
||||||
|
unit/text/text_placements_list.cpp
|
||||||
|
unit/text/text_placements_simple.cpp
|
||||||
|
unit/util/char_array_buffer.cpp
|
||||||
|
unit/vertex_adapter/clipping_test.cpp
|
||||||
|
unit/vertex_adapter/extend_converter.cpp
|
||||||
|
unit/vertex_adapter/line_offset_test.cpp
|
||||||
|
unit/vertex_adapter/offset_converter.cpp
|
||||||
|
unit/vertex_adapter/simplify_converters_test.cpp
|
||||||
|
unit/vertex_adapter/transform_path_adapter.cpp
|
||||||
|
unit/vertex_adapter/vertex_adapter.cpp
|
||||||
)
|
)
|
||||||
target_link_libraries(mapnik-test-unit PUBLIC
|
target_link_libraries(mapnik-test-unit PUBLIC
|
||||||
Catch
|
Catch
|
||||||
|
@ -24,8 +103,46 @@ target_link_libraries(mapnik-test-unit PUBLIC
|
||||||
mapnik::mapnik
|
mapnik::mapnik
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_executable(agg_rasterizer_integer_overflow_test standalone/agg_rasterizer_integer_overflow_test.cpp)
|
||||||
|
target_link_libraries(agg_rasterizer_integer_overflow_test PUBLIC
|
||||||
|
Catch
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(datasource_registration_test standalone/datasource_registration_test.cpp)
|
||||||
|
target_link_libraries(datasource_registration_test PUBLIC
|
||||||
|
Catch
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(font_registration_test standalone/font_registration_test.cpp)
|
||||||
|
target_link_libraries(font_registration_test PUBLIC
|
||||||
|
Catch
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(map_xml_test standalone/map_xml_test.cpp)
|
||||||
|
target_link_libraries(map_xml_test PUBLIC
|
||||||
|
Catch
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(mapnik-test-visual
|
||||||
|
visual/parse_map_sizes.cpp
|
||||||
|
visual/report.cpp
|
||||||
|
visual/runner.cpp
|
||||||
|
visual/run.cpp
|
||||||
|
)
|
||||||
|
target_link_libraries(
|
||||||
|
mapnik-test-visual PRIVATE
|
||||||
|
Boost::program_options
|
||||||
|
mapnik::headers
|
||||||
|
mapnik::mapnik
|
||||||
|
)
|
||||||
|
|
||||||
include(CTest)
|
include(CTest)
|
||||||
include(${catch2_SOURCE_DIR}/contrib/Catch.cmake)
|
include(${catch2_SOURCE_DIR}/contrib/Catch.cmake)
|
||||||
include(${catch2_SOURCE_DIR}/contrib/ParseAndAddCatchTests.cmake)
|
include(${catch2_SOURCE_DIR}/contrib/ParseAndAddCatchTests.cmake)
|
||||||
|
|
||||||
ParseAndAddCatchTests(mapnik-test-unit)
|
ParseAndAddCatchTests(mapnik-test-unit)
|
||||||
|
catch_discover_tests(agg_rasterizer_integer_overflow_test)
|
||||||
|
catch_discover_tests(datasource_registration_test)
|
||||||
|
catch_discover_tests(font_registration_test)
|
||||||
|
catch_discover_tests(map_xml_test)
|
Loading…
Reference in a new issue