From 554556e4d51f1bc1cbe4ecff3f70e12345ed8a39 Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Thu, 4 Mar 2021 10:18:42 +0000 Subject: [PATCH] Add support for libproj >=8 --- include/mapnik/projection.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/mapnik/projection.hpp b/include/mapnik/projection.hpp index ac78a4469..4d7be1708 100644 --- a/include/mapnik/projection.hpp +++ b/include/mapnik/projection.hpp @@ -39,9 +39,14 @@ MAPNIK_DISABLE_WARNING_POP // fwd decl +#if PROJ_VERSION_MAJOR >= 8 +struct pj_ctx; +using PJ_CONTEXT = struct pj_ctx; +#else struct projCtx_t; -struct PJconsts; using PJ_CONTEXT = struct projCtx_t; +#endif +struct PJconsts; using PJ = struct PJconsts; namespace mapnik { @@ -59,7 +64,7 @@ class MAPNIK_DECL projection public: projection(std::string const& params, - bool defer_proj_init = false); + bool defer_proj_init = false); projection(projection const& rhs); ~projection();