forked from mapnik/python-mapnik
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
68 lines (64 loc) · 2.19 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
cmake_minimum_required(VERSION 3.15)
project(${SKBUILD_PROJECT_NAME} LANGUAGES CXX VERSION ${SKBUILD_PROJECT_VERSION})
find_package(Python COMPONENTS Interpreter Development.Module)
find_package(mapnik CONFIG REQUIRED)
find_package(Boost REQUIRED COMPONENTS thread python${Python_VERSION_MAJOR}${Python_VERSION_MINOR})
add_compile_definitions(HAVE_PYCAIRO)
#set(Python_SOABI ${SKBUILD_SOABI})
Python_add_library(_mapnik MODULE)
target_include_directories(_mapnik PUBLIC /usr/include/pycairo)
target_link_libraries(_mapnik PRIVATE
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::python${Python_VERSION_MAJOR}${Python_VERSION_MINOR}
ICU::data ICU::i18n ICU::uc
)
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
)
install(TARGETS _mapnik LIBRARY DESTINATION ${SKBUILD_PROJECT_NAME})