libcbor: Add patch for CMake 4+ compatibility

Fix:

| CMake Error at CMakeLists.txt:1 (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-09 20:30:39 +03:00
committed by Khem Raj
parent ad2a75a0ac
commit 882e039c19
2 changed files with 43 additions and 2 deletions

View File

@@ -0,0 +1,40 @@
From 4b34fd7b4d674eeba5e9572df1d88bafa1d100e3 Mon Sep 17 00:00:00 2001
From: Alper Ak <alperyasinak1@gmail.com>
Date: Wed, 9 Jul 2025 11:29:39 +0300
Subject: [PATCH] cmake: Set minimum required version to 3.5 for CMake 4+
compatibility
Fix:
| CMake Error at CMakeLists.txt:1 (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/PJK/libcbor/commit/1183292d4695300785b272532c1e02d68840e4b8]
Signed-off-by: Alper Ak <alperyasinak1@gmail.com>
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 815675e..a9f9bd5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.5)
project(libcbor)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
--
2.43.0

View File

@@ -4,9 +4,10 @@ DESCRIPTION = "C library for parsing and generating CBOR, the general-purpose sc
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=6f3b3881df62ca763a02d359a6e94071"
SRC_URI = "git://github.com/PJK/libcbor.git;protocol=https;branch=master"
SRCREV = "ae000f44e8d2a69e1f72a738f7c0b6b4b7cc4fbf"
SRC_URI = "git://github.com/PJK/libcbor.git;protocol=https;branch=master \
file://0001-allow-build-with-cmake-4.patch"
SRCREV = "ae000f44e8d2a69e1f72a738f7c0b6b4b7cc4fbf"
inherit cmake