changeset 35:9587f2820c11

fix for recent versions of cmake
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 23 Sep 2025 11:46:28 +0200
parents 935c02235c49
children 341d322bd97b 267991607918
files CMakeLists.txt
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/CMakeLists.txt	Tue Sep 23 11:32:56 2025 +0200
+++ b/CMakeLists.txt	Tue Sep 23 11:46:28 2025 +0200
@@ -57,7 +57,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)