precommit
This commit is contained in:
parent
213be3777c
commit
eb3823aa4a
17 changed files with 28 additions and 27 deletions
|
@ -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}"
|
||||
|
|
|
@ -2,8 +2,8 @@ add_library(datasource-base INTERFACE)
|
|||
add_library(mapnik::datasource-base ALIAS datasource-base)
|
||||
|
||||
|
||||
target_include_directories(datasource-base INTERFACE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
target_include_directories(datasource-base INTERFACE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
)
|
||||
target_link_libraries(datasource-base INTERFACE mapnik::core)
|
||||
|
|
|
@ -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<pluginclassname>(params); \
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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 && <target> is build) then add link target
|
||||
$<$<AND:$<NOT:$<BOOL:${BUILD_SHARED_PLUGINS}>>,$<TARGET_EXISTS:input-csv>>: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()
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
using mapnik::datasource;
|
||||
using mapnik::parameters;
|
||||
|
||||
|
||||
DATASOURCE_PLUGIN_EXPORT(mapnik::memory_datasource_plugin)
|
||||
|
||||
namespace mapnik {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
target_sources(wkt PRIVATE
|
||||
target_sources(wkt PRIVATE
|
||||
geometry_to_wkt.cpp
|
||||
mapnik_wkt_generator_grammar.cpp
|
||||
wkt_factory.cpp
|
||||
|
|
Loading…
Reference in a new issue