Skip to content

Commit a0a5fe6

Browse files
committed
rework build system
1 parent 372dba1 commit a0a5fe6

File tree

7 files changed

+90
-431
lines changed

7 files changed

+90
-431
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ mapnik/paths.py
1818
.mason/
1919
mason_packages/
2020
mapnik/plugins
21+
_skbuild/

CMakeLists.txt

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
cmake_minimum_required(VERSION 3.15)
2+
set(CMAKE_TOOLCHAIN_FILE "D:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake")
3+
project(python-mapnik)
4+
5+
find_package(PythonExtensions REQUIRED)
6+
find_package(mapnik CONFIG REQUIRED)
7+
find_package(Boost REQUIRED COMPONENTS thread python310)
8+
9+
add_library(_mapnik MODULE)
10+
target_link_libraries(_mapnik
11+
mapnik::mapnik
12+
mapnik::json
13+
mapnik::wkt
14+
# even though boost_thread is no longer used in mapnik core
15+
# we need to link in for boost_python to avoid missing symbol: _ZN5boost6detail12get_tss_dataEPKv / boost::detail::get_tss_data
16+
Boost::thread
17+
Boost::python310
18+
)
19+
target_sources(_mapnik PRIVATE
20+
src/boost_std_shared_shim.hpp
21+
src/mapnik_color.cpp
22+
src/mapnik_coord.cpp
23+
src/mapnik_datasource_cache.cpp
24+
src/mapnik_datasource.cpp
25+
src/mapnik_enumeration_wrapper_converter.hpp
26+
src/mapnik_enumeration.hpp
27+
src/mapnik_envelope.cpp
28+
src/mapnik_expression.cpp
29+
src/mapnik_feature.cpp
30+
src/mapnik_featureset.cpp
31+
src/mapnik_font_engine.cpp
32+
src/mapnik_fontset.cpp
33+
src/mapnik_gamma_method.cpp
34+
src/mapnik_geometry.cpp
35+
src/mapnik_grid_view.cpp
36+
src/mapnik_grid.cpp
37+
src/mapnik_image_view.cpp
38+
src/mapnik_image.cpp
39+
src/mapnik_label_collision_detector.cpp
40+
src/mapnik_layer.cpp
41+
src/mapnik_logger.cpp
42+
src/mapnik_map.cpp
43+
src/mapnik_palette.cpp
44+
src/mapnik_parameters.cpp
45+
src/mapnik_proj_transform.cpp
46+
src/mapnik_projection.cpp
47+
src/mapnik_python.cpp
48+
src/mapnik_query.cpp
49+
src/mapnik_raster_colorizer.cpp
50+
src/mapnik_rule.cpp
51+
src/mapnik_scaling_method.cpp
52+
src/mapnik_style.cpp
53+
src/mapnik_svg.hpp
54+
src/mapnik_symbolizer.cpp
55+
src/mapnik_threads.hpp
56+
src/mapnik_value_converter.hpp
57+
src/mapnik_view_transform.cpp
58+
src/python_grid_utils.cpp
59+
src/python_grid_utils.hpp
60+
src/python_optional.hpp
61+
src/python_to_value.hpp
62+
)
63+
python_extension_module(_mapnik)
64+
65+
install(TARGETS _mapnik LIBRARY DESTINATION mapnik)

build.py

-120
This file was deleted.

pyproject.toml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[build-system]
2+
requires = [
3+
"setuptools>=42",
4+
"scikit-build>=0.13",
5+
"cmake>=3.18",
6+
"ninja",
7+
]
8+
build-backend = "setuptools.build_meta"

setup.cfg

-2
This file was deleted.

0 commit comments

Comments
 (0)