diff --git a/CMakeLists.txt b/CMakeLists.txt index f799b331f9009..b63b3a7794440 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -101,9 +101,16 @@ find_package(GMP REQUIRED) find_package(ZMQ) find_package(Miniupnp) find_package(NAT-PMP) -find_package(Boost COMPONENTS system filesystem chrono thread REQUIRED) find_package(Sodium REQUIRED) +# Use the now deprecated FindBoost internal for CMake versions 3.30.0 and above +# TODO: re-work this to support the upstream BoostConfig.cmake configuration. +if(CMAKE_VERSION VERSION_LESS "3.30.0") +else() + cmake_policy(SET CMP0167 OLD) +endif() +find_package(Boost COMPONENTS system filesystem chrono thread REQUIRED) + include_directories(${GMP_INCLUDE_DIR}) # run autogen.sh if missing header files from configure on Linux/Mac