diff --git a/CMakeLists.txt b/CMakeLists.txt index a4a7a8366..3319cf126 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -156,7 +156,9 @@ mapnik_find_threads() mapnik_find_package(ICU REQUIRED COMPONENTS uc i18n data) mapnik_find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS regex) - +if(CMAKE_CXX_STANDARD LESS 17) + set(USE_BOOST_FILESYSTEM ON) +endif() if(CMAKE_CXX_STANDARD LESS 17 OR USE_BOOST_FILESYSTEM) mapnik_find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS filesystem system) endif()