File clementine-cmake-pr7402.patch of Package clementine

From ec4eba532d6e4c3385180963ad0ae186e248d478 Mon Sep 17 00:00:00 2001
From: Shen Long <gitlab@sl.nospam.tangomaris.de>
Date: Mon, 7 Jul 2025 17:25:24 +0200
Subject: [PATCH] Bump CMake minimum versions to >3.30

It helps working with CMake >4.0 and also is working on CMake 3.31.7.
---
 3rdparty/libmygpo-qt5/CMakeLists.txt                   |  2 +-
 3rdparty/libprojectm/CMakeLists.txt                    | 10 +---------
 .../libprojectm/MilkdropPresetFactory/CMakeLists.txt   |  2 +-
 3rdparty/libprojectm/Renderer/CMakeLists.txt           |  2 +-
 3rdparty/qsqlite/CMakeLists.txt                        |  2 +-
 3rdparty/qtiocompressor/CMakeLists.txt                 |  2 +-
 3rdparty/qtsingleapplication/CMakeLists.txt            |  2 +-
 3rdparty/qxt/CMakeLists.txt                            |  2 +-
 3rdparty/taglib/CMakeLists.txt                         |  2 +-
 3rdparty/utf8-cpp/CMakeLists.txt                       |  2 +-
 CMakeLists.txt                                         |  4 +---
 cmake/ParseArguments.cmake                             |  2 +-
 cmake/Translations.cmake                               |  2 +-
 gst/moodbar/CMakeLists.txt                             |  2 +-
 tests/CMakeLists.txt                                   |  2 +-
 15 files changed, 15 insertions(+), 25 deletions(-)

diff --git a/3rdparty/libmygpo-qt5/CMakeLists.txt b/3rdparty/libmygpo-qt5/CMakeLists.txt
index a789728706..995cc77a85 100644
--- a/3rdparty/libmygpo-qt5/CMakeLists.txt
+++ b/3rdparty/libmygpo-qt5/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required( VERSION 3.0.0 FATAL_ERROR )
+cmake_minimum_required( VERSION 3.10.0 FATAL_ERROR )
 
 set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
 set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII" )
diff --git a/3rdparty/libprojectm/CMakeLists.txt b/3rdparty/libprojectm/CMakeLists.txt
index a70f8a2b2e..275329c78d 100644
--- a/3rdparty/libprojectm/CMakeLists.txt
+++ b/3rdparty/libprojectm/CMakeLists.txt
@@ -1,17 +1,9 @@
 PROJECT(projectM)
-cmake_minimum_required(VERSION 3.0.0)
+cmake_minimum_required(VERSION 3.10.0)
 SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The projectM core library.")
 
 include(CheckCXXCompilerFlag)
 
-cmake_policy(SET CMP0005 OLD)
-
-# This policy was only added in cmake 2.8.4
-if (CMAKE_VERSION VERSION_GREATER "2.8.3")
-  cmake_policy(SET CMP0017 OLD)
-endif (CMAKE_VERSION VERSION_GREATER "2.8.3")
-
-
 set(USE_DEVIL OFF)
 set(USE_FBO ON)
 set(USE_FTGL OFF)
diff --git a/3rdparty/libprojectm/MilkdropPresetFactory/CMakeLists.txt b/3rdparty/libprojectm/MilkdropPresetFactory/CMakeLists.txt
index 824d51faed..59f135aeee 100644
--- a/3rdparty/libprojectm/MilkdropPresetFactory/CMakeLists.txt
+++ b/3rdparty/libprojectm/MilkdropPresetFactory/CMakeLists.txt
@@ -1,5 +1,5 @@
 PROJECT(MilkdropPresetFactory)
-cmake_minimum_required(VERSION 3.0.0)
+cmake_minimum_required(VERSION 3.10.0)
 
     if(COMMAND cmake_policy)
       cmake_policy(SET CMP0003 NEW)
diff --git a/3rdparty/libprojectm/Renderer/CMakeLists.txt b/3rdparty/libprojectm/Renderer/CMakeLists.txt
index 40bfe2c20d..b5f7ea0967 100644
--- a/3rdparty/libprojectm/Renderer/CMakeLists.txt
+++ b/3rdparty/libprojectm/Renderer/CMakeLists.txt
@@ -1,5 +1,5 @@
 PROJECT(Renderer)
-cmake_minimum_required(VERSION 3.0.0)
+cmake_minimum_required(VERSION 3.10.0)
 
 if(COMMAND cmake_policy)
   cmake_policy(SET CMP0003 NEW)
diff --git a/3rdparty/qsqlite/CMakeLists.txt b/3rdparty/qsqlite/CMakeLists.txt
index 0f1fba525c..f790710a59 100644
--- a/3rdparty/qsqlite/CMakeLists.txt
+++ b/3rdparty/qsqlite/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.0.0)
+cmake_minimum_required(VERSION 3.10.0)
 
 add_definitions(-DQT_STATICPLUGIN)
 
diff --git a/3rdparty/qtiocompressor/CMakeLists.txt b/3rdparty/qtiocompressor/CMakeLists.txt
index 98d6445f85..2b434da7e7 100644
--- a/3rdparty/qtiocompressor/CMakeLists.txt
+++ b/3rdparty/qtiocompressor/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.0.0)
+cmake_minimum_required(VERSION 3.10.0)
 
 set(IOCOMPRESSOR-SOURCES
     qtiocompressor.cpp
diff --git a/3rdparty/qtsingleapplication/CMakeLists.txt b/3rdparty/qtsingleapplication/CMakeLists.txt
index c405256f9a..c9ee4afe6c 100644
--- a/3rdparty/qtsingleapplication/CMakeLists.txt
+++ b/3rdparty/qtsingleapplication/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.0.0)
+cmake_minimum_required(VERSION 3.10.0)
 
 set(SINGLEAPP-SOURCES
     qtlocalpeer.cpp
diff --git a/3rdparty/qxt/CMakeLists.txt b/3rdparty/qxt/CMakeLists.txt
index b3348c4b86..7d60902379 100644
--- a/3rdparty/qxt/CMakeLists.txt
+++ b/3rdparty/qxt/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.0.0)
+cmake_minimum_required(VERSION 3.10.0)
 set(CMAKE_CXX_STANDARD 11)
 
 set(QXT-SOURCES
diff --git a/3rdparty/taglib/CMakeLists.txt b/3rdparty/taglib/CMakeLists.txt
index 39ffb95340..1d74b6135c 100644
--- a/3rdparty/taglib/CMakeLists.txt
+++ b/3rdparty/taglib/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.0.0)
+cmake_minimum_required(VERSION 3.10.0)
 set(CMAKE_CXX_STANDARD 11)
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-delete-non-virtual-dtor")
 
diff --git a/3rdparty/utf8-cpp/CMakeLists.txt b/3rdparty/utf8-cpp/CMakeLists.txt
index 14e7fcdc2a..f3ea1ae9a7 100644
--- a/3rdparty/utf8-cpp/CMakeLists.txt
+++ b/3rdparty/utf8-cpp/CMakeLists.txt
@@ -1,2 +1,2 @@
-cmake_minimum_required(VERSION 3.0.0)
+cmake_minimum_required(VERSION 3.10.0)
 set(CMAKE_CXX_STANDARD 11)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 48b55f4c55..f9076d9b49 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,8 +1,6 @@
-cmake_minimum_required(VERSION 3.13.0)
+cmake_minimum_required(VERSION 3.30.0)
 project(clementine)
 
-cmake_policy(SET CMP0053 OLD)
-
 include(CheckCXXCompilerFlag)
 include(FindPkgConfig)
 include(cmake/C++11Compat.cmake)
diff --git a/cmake/ParseArguments.cmake b/cmake/ParseArguments.cmake
index fd5f9987ec..19ca67ab1c 100644
--- a/cmake/ParseArguments.cmake
+++ b/cmake/ParseArguments.cmake
@@ -1,6 +1,6 @@
 # From http://www.cmake.org/Wiki/CMakeMacroParseArguments
 
-cmake_minimum_required(VERSION 3.0.0)
+cmake_minimum_required(VERSION 3.10.0)
 
 MACRO(PARSE_ARGUMENTS prefix arg_names option_names)
   SET(DEFAULT_ARGS)
diff --git a/cmake/Translations.cmake b/cmake/Translations.cmake
index a16bcc3901..fbee765107 100644
--- a/cmake/Translations.cmake
+++ b/cmake/Translations.cmake
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.0.0)
+cmake_minimum_required(VERSION 3.10.0)
 
 set (XGETTEXT_OPTIONS --qt --keyword=tr:1,2c --keyword=tr --flag=tr:1:pass-c-format --flag=tr:1:pass-qt-format
     --keyword=trUtf8 --flag=tr:1:pass-c-format --flag=tr:1:pass-qt-format
diff --git a/gst/moodbar/CMakeLists.txt b/gst/moodbar/CMakeLists.txt
index 0bb87e8844..dfe9bc9830 100644
--- a/gst/moodbar/CMakeLists.txt
+++ b/gst/moodbar/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.0.0)
+cmake_minimum_required(VERSION 3.10.0)
 
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wall")
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 81031b072e..b7ada3ae79 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.0.0)
+cmake_minimum_required(VERSION 3.10.0)
 
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -Wno-c++11-narrowing")
 
openSUSE Build Service is sponsored by