File cmake-extras-1.8-cmake4.patch of Package cmake-extras

From df9801b2882f3c4cd488f0605f17dc8ed35b2dab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <foss@grueninger.de>
Date: Thu, 27 Mar 2025 19:20:53 +0100
Subject: [PATCH] [cmake] Require minimum CMake version 3.10

Soon CMake 4.0 will be released. It requires that projects
set a minimum required CMake version of 3.5 and warns that
CMake older than 3.10 is deprecated. There is a
workaround with an additional flag, but it would is better
to increase the minimum required version.
---
 CMakeLists.txt                              | 2 +-
 examples/copyrighttest-demo/CMakeLists.txt  | 2 +-
 examples/doxygenbuilder-demo/CMakeLists.txt | 2 +-
 examples/findgmock-demo/CMakeLists.txt      | 2 +-
 examples/gdbus-demo/CMakeLists.txt          | 2 +-
 examples/gsettings-demo/CMakeLists.txt      | 2 +-
 examples/includechecker-demo/CMakeLists.txt | 2 +-
 examples/intltool-demo/CMakeLists.txt       | 2 +-
 src/GdbusCodegen/GdbusCodegenConfig.cmake   | 3 ---
 9 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d1401c3..ee73147 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.0.2)
+cmake_minimum_required(VERSION 3.10)
 project(cmake-extras VERSION 1.8)
 
 include(GNUInstallDirs)
diff --git a/examples/copyrighttest-demo/CMakeLists.txt b/examples/copyrighttest-demo/CMakeLists.txt
index 79d981d..a26bf12 100644
--- a/examples/copyrighttest-demo/CMakeLists.txt
+++ b/examples/copyrighttest-demo/CMakeLists.txt
@@ -14,7 +14,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-cmake_minimum_required(VERSION 3.0.2)
+cmake_minimum_required(VERSION 3.10)
 project(copyrighttest-demo LANGUAGES C CXX)
 
 include(CTest)
diff --git a/examples/doxygenbuilder-demo/CMakeLists.txt b/examples/doxygenbuilder-demo/CMakeLists.txt
index 0bdef93..9efb49d 100644
--- a/examples/doxygenbuilder-demo/CMakeLists.txt
+++ b/examples/doxygenbuilder-demo/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.10)
 project(doxygenbuilder-demo LANGUAGES C CXX)
 
 include(GNUInstallDirs)
diff --git a/examples/findgmock-demo/CMakeLists.txt b/examples/findgmock-demo/CMakeLists.txt
index 255e793..24848bf 100644
--- a/examples/findgmock-demo/CMakeLists.txt
+++ b/examples/findgmock-demo/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.0.2)
+cmake_minimum_required(VERSION 3.10)
 project(findgmock-demo LANGUAGES C CXX)
 
 # find_package(GMock) will find the Google Mock source, and add it to
diff --git a/examples/gdbus-demo/CMakeLists.txt b/examples/gdbus-demo/CMakeLists.txt
index 619ae11..2c58ceb 100644
--- a/examples/gdbus-demo/CMakeLists.txt
+++ b/examples/gdbus-demo/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.10)
 project(gdbus-demo)
 
 set (CMAKE_CXX_STANDARD 14)
diff --git a/examples/gsettings-demo/CMakeLists.txt b/examples/gsettings-demo/CMakeLists.txt
index 03abf49..65957ae 100644
--- a/examples/gsettings-demo/CMakeLists.txt
+++ b/examples/gsettings-demo/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.10)
 project(intltool-demo)
 
 enable_testing()
diff --git a/examples/includechecker-demo/CMakeLists.txt b/examples/includechecker-demo/CMakeLists.txt
index 77a6694..3ccc5b5 100644
--- a/examples/includechecker-demo/CMakeLists.txt
+++ b/examples/includechecker-demo/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.10)
 project(includechecker-demo LANGUAGES C CXX)
 
 include(GNUInstallDirs)
diff --git a/examples/intltool-demo/CMakeLists.txt b/examples/intltool-demo/CMakeLists.txt
index 96cd64e..4d422d6 100644
--- a/examples/intltool-demo/CMakeLists.txt
+++ b/examples/intltool-demo/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.10)
 project(intltool-demo LANGUAGES C CXX)
 
 include(GNUInstallDirs)
diff --git a/src/GdbusCodegen/GdbusCodegenConfig.cmake b/src/GdbusCodegen/GdbusCodegenConfig.cmake
index 552a8d4..6e51098 100644
--- a/src/GdbusCodegen/GdbusCodegenConfig.cmake
+++ b/src/GdbusCodegen/GdbusCodegenConfig.cmake
@@ -1,7 +1,4 @@
 cmake_minimum_required(VERSION 3.13)
-if(POLICY CMP0011)
-  cmake_policy(SET CMP0011 NEW)
-endif(POLICY CMP0011)
 
 find_program(GDBUS_CODEGEN NAMES gdbus-codegen DOC "gdbus-codegen executable")
 if(NOT GDBUS_CODEGEN)
-- 
2.49.0

openSUSE Build Service is sponsored by