From e412149bd1da7b30846e87c09813f0b719a61089 Mon Sep 17 00:00:00 2001
From: Marc Jeanmougin <marc@jeanmougin.fr>
Date: Mon, 3 Feb 2025 19:40:11 +0100
Subject: [PATCH] Bump cmake requirements

---
 CMakeLists.txt                           | 12 ++++--------
 CMakeScripts/DefineDependsandFlags.cmake |  2 +-
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3765ed4bd92..79bfa42a842 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,13 +1,9 @@
 # SPDX-License-Identifier: GPL-2.0-or-later
-cmake_minimum_required(VERSION 3.1.0)
+cmake_minimum_required(VERSION 3.12.0)
 
-cmake_policy(SET CMP0003 NEW) # don't be prolific with library paths
-cmake_policy(SET CMP0005 NEW) # proper define quoting
-cmake_policy(SET CMP0009 NEW) # don't follow symbolic links when using GLOB
-
-if(POLICY CMP0075)
-    cmake_policy(SET CMP0075 NEW) # link check-executable to CMAKE_REQUIRED_LIBRARIES (CMake 3.12.1)
-endif(POLICY CMP0075)
+if(POLICY CMP0167)
+    cmake_policy(SET CMP0167 NEW) # use FindBoost from boost 1.70+ (cmake 3.30+)
+endif()
 
 message("------------------------------")
 message("Building Makefile for Inkscape")
diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake
index bebb49e5e05..744e9787c34 100644
--- a/CMakeScripts/DefineDependsandFlags.cmake
+++ b/CMakeScripts/DefineDependsandFlags.cmake
@@ -164,7 +164,7 @@ add_definitions(${Intl_DEFINITIONS})
 
 # Check for system-wide version of 2geom and fallback to internal copy if not found
 if(NOT WITH_INTERNAL_2GEOM)
-    pkg_check_modules(2Geom QUIET IMPORTED_TARGET GLOBAL 2geom>=1.4.0)
+    pkg_check_modules(2Geom QUIET IMPORTED_TARGET GLOBAL 2geom>=${INKSCAPE_VERSION_MAJOR}.${INKSCAPE_VERSION_MINOR})
     if(2Geom_FOUND)
         add_library(2Geom::2geom ALIAS PkgConfig::2Geom)
     else()
-- 
GitLab

