Skip to content

Commit

Permalink
rework build system
Browse files Browse the repository at this point in the history
  • Loading branch information
mathisloge committed Jan 25, 2023
1 parent 372dba1 commit a0a5fe6
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 431 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ mapnik/paths.py
.mason/
mason_packages/
mapnik/plugins
_skbuild/
65 changes: 65 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
cmake_minimum_required(VERSION 3.15)
set(CMAKE_TOOLCHAIN_FILE "D:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake")
project(python-mapnik)

find_package(PythonExtensions REQUIRED)
find_package(mapnik CONFIG REQUIRED)
find_package(Boost REQUIRED COMPONENTS thread python310)

add_library(_mapnik MODULE)
target_link_libraries(_mapnik
mapnik::mapnik
mapnik::json
mapnik::wkt
# even though boost_thread is no longer used in mapnik core
# we need to link in for boost_python to avoid missing symbol: _ZN5boost6detail12get_tss_dataEPKv / boost::detail::get_tss_data
Boost::thread
Boost::python310
)
target_sources(_mapnik PRIVATE
src/boost_std_shared_shim.hpp
src/mapnik_color.cpp
src/mapnik_coord.cpp
src/mapnik_datasource_cache.cpp
src/mapnik_datasource.cpp
src/mapnik_enumeration_wrapper_converter.hpp
src/mapnik_enumeration.hpp
src/mapnik_envelope.cpp
src/mapnik_expression.cpp
src/mapnik_feature.cpp
src/mapnik_featureset.cpp
src/mapnik_font_engine.cpp
src/mapnik_fontset.cpp
src/mapnik_gamma_method.cpp
src/mapnik_geometry.cpp
src/mapnik_grid_view.cpp
src/mapnik_grid.cpp
src/mapnik_image_view.cpp
src/mapnik_image.cpp
src/mapnik_label_collision_detector.cpp
src/mapnik_layer.cpp
src/mapnik_logger.cpp
src/mapnik_map.cpp
src/mapnik_palette.cpp
src/mapnik_parameters.cpp
src/mapnik_proj_transform.cpp
src/mapnik_projection.cpp
src/mapnik_python.cpp
src/mapnik_query.cpp
src/mapnik_raster_colorizer.cpp
src/mapnik_rule.cpp
src/mapnik_scaling_method.cpp
src/mapnik_style.cpp
src/mapnik_svg.hpp
src/mapnik_symbolizer.cpp
src/mapnik_threads.hpp
src/mapnik_value_converter.hpp
src/mapnik_view_transform.cpp
src/python_grid_utils.cpp
src/python_grid_utils.hpp
src/python_optional.hpp
src/python_to_value.hpp
)
python_extension_module(_mapnik)

install(TARGETS _mapnik LIBRARY DESTINATION mapnik)
120 changes: 0 additions & 120 deletions build.py

This file was deleted.

8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[build-system]
requires = [
"setuptools>=42",
"scikit-build>=0.13",
"cmake>=3.18",
"ninja",
]
build-backend = "setuptools.build_meta"
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

Loading

0 comments on commit a0a5fe6

Please sign in to comment.