From eb3823aa4a28ebce4db490f71fd51532ae2c00d9 Mon Sep 17 00:00:00 2001 From: Mathis Logemann Date: Wed, 17 Aug 2022 17:35:25 +0200 Subject: [PATCH] precommit --- plugins/input/CMakeLists.txt | 2 +- plugins/input/base/CMakeLists.txt | 4 ++-- plugins/input/base/include/mapnik/datasource_plugin.hpp | 5 ++++- plugins/input/csv/CMakeLists.txt | 4 ++-- plugins/input/gdal/CMakeLists.txt | 2 +- plugins/input/geobuf/CMakeLists.txt | 2 +- plugins/input/geojson/CMakeLists.txt | 6 +++--- plugins/input/pgraster/CMakeLists.txt | 4 ++-- plugins/input/pgraster/pgraster_datasource.cpp | 1 - plugins/input/postgis/CMakeLists.txt | 4 ++-- plugins/input/raster/CMakeLists.txt | 2 +- plugins/input/shape/CMakeLists.txt | 4 ++-- plugins/input/sqlite/CMakeLists.txt | 2 +- src/CMakeLists.txt | 8 ++++---- src/mapnik.cpp | 2 +- src/memory_datasource.cpp | 1 - src/wkt/CMakeLists.txt | 2 +- 17 files changed, 28 insertions(+), 27 deletions(-) diff --git a/plugins/input/CMakeLists.txt b/plugins/input/CMakeLists.txt index 878b7ff65..7a5336492 100644 --- a/plugins/input/CMakeLists.txt +++ b/plugins/input/CMakeLists.txt @@ -13,7 +13,7 @@ endif() macro(add_plugin_target plugin_target output_name) add_library(${plugin_target} ${_plugin_linkage}) - set_target_properties(${plugin_target} PROPERTIES + set_target_properties(${plugin_target} PROPERTIES OUTPUT_NAME "${output_name}" POSITION_INDEPENDENT_CODE ${_plugin_fpic} PREFIX "${_plugin_prefix}" diff --git a/plugins/input/base/CMakeLists.txt b/plugins/input/base/CMakeLists.txt index 2e080bd29..bf76706b8 100644 --- a/plugins/input/base/CMakeLists.txt +++ b/plugins/input/base/CMakeLists.txt @@ -2,8 +2,8 @@ add_library(datasource-base INTERFACE) add_library(mapnik::datasource-base ALIAS datasource-base) -target_include_directories(datasource-base INTERFACE - $ +target_include_directories(datasource-base INTERFACE + $ $ ) target_link_libraries(datasource-base INTERFACE mapnik::core) diff --git a/plugins/input/base/include/mapnik/datasource_plugin.hpp b/plugins/input/base/include/mapnik/datasource_plugin.hpp index 32d67dcfa..ee6f7a854 100644 --- a/plugins/input/base/include/mapnik/datasource_plugin.hpp +++ b/plugins/input/base/include/mapnik/datasource_plugin.hpp @@ -29,7 +29,10 @@ class MAPNIK_DECL datasource_plugin }; #define DATASOURCE_PLUGIN_IMPL(classname, pluginclassname) \ - const char* classname::name() const { return kName; } \ + const char* classname::name() const \ + { \ + return kName; \ + } \ mapnik::datasource_ptr classname::create(mapnik::parameters const& params) const \ { \ return std::make_shared(params); \ diff --git a/plugins/input/csv/CMakeLists.txt b/plugins/input/csv/CMakeLists.txt index 9d9d028b9..bb2739dd1 100644 --- a/plugins/input/csv/CMakeLists.txt +++ b/plugins/input/csv/CMakeLists.txt @@ -8,8 +8,8 @@ target_sources(input-csv ${_plugin_visibility} csv_utils.cpp ) target_link_libraries(input-csv ${_plugin_visibility} - mapnik::mapnik - mapnik::wkt + mapnik::mapnik + mapnik::wkt mapnik::json mapnik::datasource-base ) diff --git a/plugins/input/gdal/CMakeLists.txt b/plugins/input/gdal/CMakeLists.txt index 2ef39fb14..440c545b3 100644 --- a/plugins/input/gdal/CMakeLists.txt +++ b/plugins/input/gdal/CMakeLists.txt @@ -6,7 +6,7 @@ target_sources(input-gdal ${_plugin_visibility} gdal_featureset.cpp ) target_include_directories(input-gdal ${_plugin_visibility} ${GDAL_INCLUDE_DIRS}) -target_link_libraries(input-gdal ${_plugin_visibility} +target_link_libraries(input-gdal ${_plugin_visibility} mapnik::mapnik mapnik::datasource-base ${GDAL_LIBRARIES} diff --git a/plugins/input/geobuf/CMakeLists.txt b/plugins/input/geobuf/CMakeLists.txt index a467ec4e7..8bcf7b132 100644 --- a/plugins/input/geobuf/CMakeLists.txt +++ b/plugins/input/geobuf/CMakeLists.txt @@ -4,7 +4,7 @@ target_sources(input-geobuf ${_plugin_visibility} geobuf_datasource.cpp geobuf_featureset.cpp ) -target_link_libraries(input-geobuf ${_plugin_visibility} +target_link_libraries(input-geobuf ${_plugin_visibility} mapnik::mapnik mapnik::datasource-base ) diff --git a/plugins/input/geojson/CMakeLists.txt b/plugins/input/geojson/CMakeLists.txt index cf86e73d5..d6919a405 100644 --- a/plugins/input/geojson/CMakeLists.txt +++ b/plugins/input/geojson/CMakeLists.txt @@ -1,8 +1,8 @@ add_plugin_target(input-geojson "geojson") target_sources(input-geojson ${_plugin_visibility} - geojson_datasource.cpp - geojson_featureset.cpp - geojson_index_featureset.cpp + geojson_datasource.cpp + geojson_featureset.cpp + geojson_index_featureset.cpp geojson_memory_index_featureset.cpp ) target_link_libraries(input-geojson ${_plugin_visibility} diff --git a/plugins/input/pgraster/CMakeLists.txt b/plugins/input/pgraster/CMakeLists.txt index 6a2446513..21a58e733 100644 --- a/plugins/input/pgraster/CMakeLists.txt +++ b/plugins/input/pgraster/CMakeLists.txt @@ -2,8 +2,8 @@ mapnik_find_package(PostgreSQL REQUIRED) add_plugin_target(input-pgraster "pgraster") target_sources(input-pgraster ${_plugin_visibility} - pgraster_datasource.cpp - pgraster_featureset.cpp + pgraster_datasource.cpp + pgraster_featureset.cpp pgraster_wkb_reader.cpp ) target_link_libraries(input-pgraster ${_plugin_visibility} diff --git a/plugins/input/pgraster/pgraster_datasource.cpp b/plugins/input/pgraster/pgraster_datasource.cpp index 9ee183703..cdd03507a 100644 --- a/plugins/input/pgraster/pgraster_datasource.cpp +++ b/plugins/input/pgraster/pgraster_datasource.cpp @@ -56,7 +56,6 @@ DATASOURCE_PLUGIN_EXPORT(pgraster_datasource_plugin); DATASOURCE_PLUGIN_EMPTY_AFTER_LOAD(pgraster_datasource_plugin); DATASOURCE_PLUGIN_EMPTY_BEFORE_UNLOAD(pgraster_datasource_plugin); - const std::string pgraster_datasource::RASTER_COLUMNS = "raster_columns"; const std::string pgraster_datasource::RASTER_OVERVIEWS = "raster_overviews"; const std::string pgraster_datasource::SPATIAL_REF_SYS = "spatial_ref_system"; diff --git a/plugins/input/postgis/CMakeLists.txt b/plugins/input/postgis/CMakeLists.txt index 3c1405496..e26e9b8c9 100644 --- a/plugins/input/postgis/CMakeLists.txt +++ b/plugins/input/postgis/CMakeLists.txt @@ -2,8 +2,8 @@ mapnik_find_package(PostgreSQL REQUIRED) add_plugin_target(input-postgis "postgis") target_sources(input-postgis ${_plugin_visibility} - postgis_datasource.cpp - postgis_featureset.cpp + postgis_datasource.cpp + postgis_featureset.cpp ) target_link_libraries(input-postgis ${_plugin_visibility} mapnik::mapnik diff --git a/plugins/input/raster/CMakeLists.txt b/plugins/input/raster/CMakeLists.txt index 5adca0106..ca3826a70 100644 --- a/plugins/input/raster/CMakeLists.txt +++ b/plugins/input/raster/CMakeLists.txt @@ -4,7 +4,7 @@ target_sources(input-raster ${_plugin_visibility} raster_featureset.cpp raster_info.cpp ) -target_link_libraries(input-raster ${_plugin_visibility} +target_link_libraries(input-raster ${_plugin_visibility} mapnik::mapnik mapnik::datasource-base ) diff --git a/plugins/input/shape/CMakeLists.txt b/plugins/input/shape/CMakeLists.txt index 695312b23..930d85f11 100644 --- a/plugins/input/shape/CMakeLists.txt +++ b/plugins/input/shape/CMakeLists.txt @@ -1,13 +1,13 @@ add_plugin_target(input-shape "shape") target_sources(input-shape ${_plugin_visibility} - dbfile.cpp + dbfile.cpp dbf_test.cpp shape_datasource.cpp shape_featureset.cpp shape_index_featureset.cpp shape_io.cpp shape_utils.cpp ) -target_link_libraries(input-shape ${_plugin_visibility} +target_link_libraries(input-shape ${_plugin_visibility} mapnik::mapnik mapnik::datasource-base ) diff --git a/plugins/input/sqlite/CMakeLists.txt b/plugins/input/sqlite/CMakeLists.txt index d3e9bc821..5d93c3756 100644 --- a/plugins/input/sqlite/CMakeLists.txt +++ b/plugins/input/sqlite/CMakeLists.txt @@ -6,7 +6,7 @@ target_sources(input-sqlite ${_plugin_visibility} sqlite_featureset.cpp ) target_link_libraries(input-sqlite ${_plugin_visibility} - mapnik::mapnik + mapnik::mapnik mapnik::datasource-base SQLite::SQLite3 ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2efe8fb3d..8ee62a2e8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,7 +7,7 @@ if(BUILD_SHARED_LIBS) endif() target_link_libraries(mapnik PUBLIC mapnik::core mapnik::datasource-base) -target_link_libraries(mapnik PRIVATE +target_link_libraries(mapnik PRIVATE mapnik::agg # expr: if(BUILD_SHARED_PLUGINS == OFF && is build) then add link target $<$>,$>:input-csv> @@ -42,7 +42,7 @@ if(NOT BUILD_SHARED_PLUGINS) target_include_directories(mapnik PRIVATE "${PROJECT_SOURCE_DIR}/plugins") endif() -set_target_properties(mapnik PROPERTIES +set_target_properties(mapnik PROPERTIES POSITION_INDEPENDENT_CODE ON DEBUG_POSTFIX "${MAPNIK_DEBUG_POSTFIX}" OUTPUT_NAME "mapnik" @@ -292,8 +292,8 @@ if(USE_TIFF) endif() if(USE_WEBP) - target_sources(mapnik PRIVATE - webp_reader.cpp + target_sources(mapnik PRIVATE + webp_reader.cpp webp_io.cpp ) endif() diff --git a/src/mapnik.cpp b/src/mapnik.cpp index 9dbe3a8e0..c36c083e4 100644 --- a/src/mapnik.cpp +++ b/src/mapnik.cpp @@ -40,7 +40,7 @@ void register_image_readers() } } // namespace mapnik -#if !defined(MAPNIK_STATIC_PLUGINS) || !defined(_WIN32) +#if !defined(MAPNIK_STATIC_PLUGINS) || !defined(_WIN32) namespace { class AutoSetup final { diff --git a/src/memory_datasource.cpp b/src/memory_datasource.cpp index 605f36ec6..60019011a 100644 --- a/src/memory_datasource.cpp +++ b/src/memory_datasource.cpp @@ -35,7 +35,6 @@ using mapnik::datasource; using mapnik::parameters; - DATASOURCE_PLUGIN_EXPORT(mapnik::memory_datasource_plugin) namespace mapnik { diff --git a/src/wkt/CMakeLists.txt b/src/wkt/CMakeLists.txt index 4fdff2229..54ca57f96 100644 --- a/src/wkt/CMakeLists.txt +++ b/src/wkt/CMakeLists.txt @@ -1,4 +1,4 @@ -target_sources(wkt PRIVATE +target_sources(wkt PRIVATE geometry_to_wkt.cpp mapnik_wkt_generator_grammar.cpp wkt_factory.cpp