From 096befe69eed03a9038cb3387c3aed0ded21e7e3 Mon Sep 17 00:00:00 2001 From: Mathis Logemann Date: Sat, 21 Nov 2020 15:34:13 +0100 Subject: [PATCH] try with c++14 --- CMakeLists.txt | 2 +- src/CMakeLists.txt | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 245f8922c..be0195a6e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,7 +45,7 @@ option(BUILD_UTILITY_PGSQL2SQLITE "builds the utility program pgsql2sqlite" ON) option(BUILD_UTILITY_SHAPEINDEX "builds the utility program shapeindex" ON) option(BUILD_UTILITY_SVG2PNG "builds the utility program svg2png" ON) -set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD 14) find_package(Boost 1.74 REQUIRED COMPONENTS filesystem system regex program_options) find_package(ICU REQUIRED COMPONENTS uc) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a4746f37c..534085ff5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -278,8 +278,12 @@ endif() add_library(mapnik ${COMPILE_SRC}) add_library(mapnik::mapnik ALIAS mapnik) +set(COMPILE_DEFS "") +if(BUILD_SHARED_LIBS) + list(APPEND COMPILE_DEFS MAPNIK_EXPORTS) +endif() -target_compile_definitions(mapnik PRIVATE MAPNIK_EXPORTS) +target_compile_definitions(mapnik PRIVATE ${COMPILE_DEFS}) target_link_libraries(mapnik PRIVATE mapnik::headers mapnik::agg