changeset 41:ac3c6d4c89c8

fix for newer versions of cmake
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 09 Dec 2025 15:23:01 +0100
parents 9d86cfafcc45
children 0fff1fb5a0a9
files CMakeLists.txt
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/CMakeLists.txt	Fri Jan 17 13:50:20 2025 +0100
+++ b/CMakeLists.txt	Tue Dec 09 15:23:01 2025 +0100
@@ -15,7 +15,7 @@
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
 
 
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8...4.0)
 
 project(OrthancTcia)
 
@@ -52,7 +52,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 thread)
     
     if (NOT Boost_FOUND)