Skip to content

Commit 1e77534

Browse files
committed
wip mapnik windows
1 parent a2c2a86 commit 1e77534

File tree

7 files changed

+237
-292
lines changed

7 files changed

+237
-292
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
[submodule "test/data"]
55
path = test/data
66
url = https://github.com/mapnik/test-data.git
7+
[submodule "vcpkg"]
8+
path = vcpkg
9+
url = https://github.com/microsoft/vcpkg

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"cmake.configureOnEdit": false,
3+
"cmake.configureOnOpen": false
4+
}

CMakeLists.txt

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
cmake_minimum_required(VERSION 3.15)
2+
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
3+
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake")
4+
endif()
5+
project(python-mapnik)
6+
7+
find_package(Python COMPONENTS Development REQUIRED)
8+
find_package(Boost COMPONENTS log python${Python_VERSION_MAJOR}${Python_VERSION_MINOR} REQUIRED)
9+
find_package(mapnik CONFIG REQUIRED)
10+
find_path(MAPBOX_GEOMETRY_INCLUDE_DIRS "mapbox/geometry.hpp" REQUIRED)
11+
12+
Python_add_library(python-mapnik MODULE
13+
src/boost_std_shared_shim.hpp
14+
src/mapnik_color.cpp
15+
src/mapnik_coord.cpp
16+
src/mapnik_datasource_cache.cpp
17+
src/mapnik_datasource.cpp
18+
src/mapnik_enumeration_wrapper_converter.hpp
19+
src/mapnik_enumeration.hpp
20+
src/mapnik_envelope.cpp
21+
src/mapnik_expression.cpp
22+
src/mapnik_feature.cpp
23+
src/mapnik_featureset.cpp
24+
src/mapnik_font_engine.cpp
25+
src/mapnik_fontset.cpp
26+
src/mapnik_gamma_method.cpp
27+
src/mapnik_geometry.cpp
28+
src/mapnik_grid_view.cpp
29+
src/mapnik_grid.cpp
30+
src/mapnik_image_view.cpp
31+
src/mapnik_image.cpp
32+
src/mapnik_label_collision_detector.cpp
33+
src/mapnik_layer.cpp
34+
src/mapnik_logger.cpp
35+
src/mapnik_map.cpp
36+
src/mapnik_palette.cpp
37+
src/mapnik_parameters.cpp
38+
src/mapnik_proj_transform.cpp
39+
src/mapnik_projection.cpp
40+
src/mapnik_python.cpp
41+
src/mapnik_query.cpp
42+
src/mapnik_raster_colorizer.cpp
43+
src/mapnik_rule.cpp
44+
src/mapnik_scaling_method.cpp
45+
src/mapnik_style.cpp
46+
src/mapnik_svg.hpp
47+
src/mapnik_symbolizer.cpp
48+
src/mapnik_threads.hpp
49+
src/mapnik_value_converter.hpp
50+
src/mapnik_view_transform.cpp
51+
src/python_grid_utils.cpp
52+
src/python_grid_utils.hpp
53+
src/python_optional.hpp
54+
src/python_to_value.hpp
55+
)
56+
57+
58+
target_link_libraries(python-mapnik PRIVATE
59+
Boost::boost
60+
Boost::log
61+
Boost::python${Python_VERSION_MAJOR}${Python_VERSION_MINOR}
62+
mapnik::core
63+
mapnik::json
64+
mapnik::wkt
65+
mapnik::mapnik
66+
)
67+
target_include_directories(python-mapnik PRIVATE
68+
${MAPBOX_GEOMETRY_INCLUDE_DIRS}
69+
)
70+
71+
set_target_properties(python-mapnik PROPERTIES OUTPUT_NAME "mapnik")

0 commit comments

Comments
 (0)