summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols/freediameter/files/0002-allow-build-with-cmake-4.patch
blob: 89a215d9752177d772796b2257196cd210be7961 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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