diff --git a/meta-networking/recipes-protocols/freediameter/files/0002-allow-build-with-cmake-4.patch b/meta-networking/recipes-protocols/freediameter/files/0002-allow-build-with-cmake-4.patch new file mode 100644 index 0000000000..89a215d975 --- /dev/null +++ b/meta-networking/recipes-protocols/freediameter/files/0002-allow-build-with-cmake-4.patch @@ -0,0 +1,81 @@ +From a96a8f8debb457fd5bdcd34f005670678870ec70 Mon Sep 17 00:00:00 2001 +From: Alper Ak +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 value. Or, use the ... syntax +| to tell CMake that the project requires at least but has been updated +| to work with policies introduced by 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 +--- + 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 + diff --git a/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb b/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb index 89b2572c04..31ac1fb9b7 100644 --- a/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb +++ b/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb @@ -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"