# HG changeset patch # User Sebastien Jodogne # Date 1744117176 -7200 # Node ID 7c787ee1f3ae6866b9d54c512532edb859d4eb29 # Parent 7954645ed8748f86020d377db96339e8871ec09a compatibility with cmake 4.0 diff -r 7954645ed874 -r 7c787ee1f3ae Applications/CMakeLists.txt --- a/Applications/CMakeLists.txt Tue Apr 08 14:47:47 2025 +0200 +++ b/Applications/CMakeLists.txt Tue Apr 08 14:59:36 2025 +0200 @@ -51,7 +51,13 @@ if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") if (ORTHANC_FRAMEWORK_USE_SHARED) - include(FindBoost) + # https://cmake.org/cmake/help/latest/policy/CMP0167.html + if (CMAKE_VERSION VERSION_GREATER "3.30") + find_package(Boost CONFIG) + else() + include(FindBoost) + endif() + find_package(Boost COMPONENTS filesystem program_options regex system thread date_time) if (NOT Boost_FOUND) diff -r 7954645ed874 -r 7c787ee1f3ae ViewerPlugin/CMakeLists.txt --- a/ViewerPlugin/CMakeLists.txt Tue Apr 08 14:47:47 2025 +0200 +++ b/ViewerPlugin/CMakeLists.txt Tue Apr 08 14:59:36 2025 +0200 @@ -54,7 +54,13 @@ if (ORTHANC_FRAMEWORK_SOURCE STREQUAL "system") if (ORTHANC_FRAMEWORK_USE_SHARED) - include(FindBoost) + # https://cmake.org/cmake/help/latest/policy/CMP0167.html + if (CMAKE_VERSION VERSION_GREATER "3.30") + find_package(Boost CONFIG) + else() + include(FindBoost) + endif() + find_package(Boost COMPONENTS system thread) if (NOT Boost_FOUND)