freediameter: Add patch for CMake 4+ compatibility

Fix:

| CMake Error at CMakeLists.txt:24 (CMAKE_MINIMUM_REQUIRED):
|   Compatibility with CMake < 3.5 has been removed from CMake.
|
|   Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
|   to tell CMake that the project requires at least <min> but has been updated
|   to work with policies introduced by <max> or earlier.
|
|   Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
|
|
| -- Configuring incomplete, errors occurred!

Signed-off-by: Alper Ak <alperyasinak1@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Alper Ak 2025-07-08 22:56:33 +03:00 committed by Khem Raj
parent 922215ac29
commit 74acd72248
No known key found for this signature in database
GPG Key ID: BB053355919D3314
2 changed files with 82 additions and 1 deletions

View File

@ -0,0 +1,81 @@
From a96a8f8debb457fd5bdcd34f005670678870ec70 Mon Sep 17 00:00:00 2001
From: Alper Ak <alperyasinak1@gmail.com>
Date: Tue, 8 Jul 2025 20:58:10 +0300
Subject: [PATCH] cmake: Set minimum required version to 3.5 for CMake 4+
compatibility
Fix:
| CMake Error at CMakeLists.txt:24 (CMAKE_MINIMUM_REQUIRED):
| Compatibility with CMake < 3.5 has been removed from CMake.
|
| Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
| to tell CMake that the project requires at least <min> but has been updated
| to work with policies introduced by <max> or earlier.
|
| Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
|
|
| -- Configuring incomplete, errors occurred!
Upstream-Status: Backport [https://github.com/freeDiameter/freeDiameter/commit/45106adf3bf4192b274ef6c5536200a0e19c84f2]
Signed-off-by: Alper Ak <alperyasinak1@gmail.com>
---
CMakeLists.txt | 6 +++---
libfdcore/CMakeLists.txt | 2 +-
libfdproto/CMakeLists.txt | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 870e1ef..f1e6dc5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,8 @@
# This file is the source for generating the Makefile for the project, using cmake tool (cmake.org)
+# CMake version
+CMAKE_MINIMUM_REQUIRED(VERSION 3.10)
+
# Name of the project
PROJECT("freeDiameter")
@@ -20,9 +23,6 @@ SET(FD_PROJECT_VERSION_API 7)
# The test framework, using CTest and CDash.
INCLUDE(CTest)
-# CMake version
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
-
# Location of additional CMake modules
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
diff --git a/libfdcore/CMakeLists.txt b/libfdcore/CMakeLists.txt
index b1bc0f1..4fefcb7 100644
--- a/libfdcore/CMakeLists.txt
+++ b/libfdcore/CMakeLists.txt
@@ -2,7 +2,7 @@
Project("freeDiameter core library" C)
# Configuration for newer cmake
-cmake_policy(VERSION 2.8.12)
+cmake_policy(VERSION 3.10)
# Configuration parser
BISON_FILE(fdd.y)
diff --git a/libfdproto/CMakeLists.txt b/libfdproto/CMakeLists.txt
index c7164fb..4cedf65 100644
--- a/libfdproto/CMakeLists.txt
+++ b/libfdproto/CMakeLists.txt
@@ -2,7 +2,7 @@
Project("libfdproto" C)
# Configuration for newer cmake
-cmake_policy(VERSION 2.8.12)
+cmake_policy(VERSION 3.10)
# List of source files for the library
SET(LFDPROTO_SRC
--
2.43.0

View File

@ -25,9 +25,9 @@ SRC_URI = "git://github.com/freeDiameter/freeDiameter;protocol=https;branch=mast
file://0001-tests-use-EXTENSIONS_DIR.patch \
file://0001-bison-flex-Add-flags-for-carrying-user-specified-par.patch \
file://0001-fixes-for-gcc-15.patch \
file://0002-allow-build-with-cmake-4.patch \
"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=868c059b6147748b1d621e500feeac4f"