diff --git a/CMakeLists.txt b/CMakeLists.txt index cd3262116..9c6dd598b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,7 @@ option(USE_TIFF "Adds tiff support" ON) option(USE_WEBP "Adds webp support" ON) option(USE_LIBXML2 "Adds libxml2 support" ON) option(USE_CAIRO "Adds the cairo renderer" ON) +option(USE_PROJ4 "adds proj4 support" ON) option(USE_PLUGIN_INPUT_CSV "adds plugin input csv" ON) option(USE_PLUGIN_INPUT_GDAL "adds plugin input gdal" ON) @@ -155,6 +156,13 @@ if(USE_CAIRO) list(APPEND MAPNIK_OPTIONAL_LIBS Cairo::Cairo) endif() +if(USE_PROJ4) + message(STATUS "Using PROJ4") + find_package(PROJ4 CONFIG REQUIRED) + list(APPEND MAPNIK_COMPILE_DEFS MAPNIK_USE_PROJ4) + list(APPEND MAPNIK_OPTIONAL_LIBS proj) +endif() + add_library(headers INTERFACE) add_library(mapnik::headers ALIAS headers)