From d680d1d7f51ed4feafb7811fa92a3e38e631c2de Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Thu, 9 Mar 2023 21:14:28 +0000 Subject: [PATCH] Update CMakeLists.txt Co-authored-by: Mathis Logemann --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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()