summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlper Ak <alperyasinak1@gmail.com>2025-07-08 22:56:19 +0300
committerKhem Raj <raj.khem@gmail.com>2025-07-09 09:16:05 -0700
commited64f4995a6312bcfad598c8a28ce08369f8520a (patch)
tree3e888892d95c8371fc85a1a02c5f778cc5c1db0b
parent2147652aba4da37147b142944e959ec1e2966281 (diff)
downloadmeta-openembedded-ed64f4995a6312bcfad598c8a28ce08369f8520a.tar.gz
cjson: Add patch for CMake 4+ compatibility
Fix: | CMake Error at CMakeLists.txt:2 (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>
-rw-r--r--meta-oe/recipes-devtools/cjson/cjson/0001-allow-build-with-cmake-4.patch41
-rw-r--r--meta-oe/recipes-devtools/cjson/cjson_1.7.18.bb2
2 files changed, 42 insertions, 1 deletions
diff --git a/meta-oe/recipes-devtools/cjson/cjson/0001-allow-build-with-cmake-4.patch b/meta-oe/recipes-devtools/cjson/cjson/0001-allow-build-with-cmake-4.patch
new file mode 100644
index 0000000000..7bd608ca0a
--- /dev/null
+++ b/meta-oe/recipes-devtools/cjson/cjson/0001-allow-build-with-cmake-4.patch
@@ -0,0 +1,41 @@
1From 8622490d650ba4d107561a0e8f3cf881fa0247c7 Mon Sep 17 00:00:00 2001
2From: Alper Ak <alperyasinak1@gmail.com>
3Date: Tue, 8 Jul 2025 15:09:11 +0300
4Subject: [PATCH] cmake: Set minimum required version to 3.5 for CMake 4+
5 compatibility
6
7Fix:
8
9| CMake Error at CMakeLists.txt:2 (cmake_minimum_required):
10| Compatibility with CMake < 3.5 has been removed from CMake.
11|
12| Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
13| to tell CMake that the project requires at least <min> but has been updated
14| to work with policies introduced by <max> or earlier.
15|
16| Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
17|
18|
19| -- Configuring incomplete, errors occurred!
20
21Upstream-Status: Submitted [https://github.com/DaveGamble/cJSON/pull/935]
22
23Signed-off-by: Alper Ak <alperyasinak1@gmail.com>
24---
25 CMakeLists.txt | 2 +-
26 1 file changed, 1 insertion(+), 1 deletion(-)
27
28diff --git a/CMakeLists.txt b/CMakeLists.txt
29index 36a6cb5..9428da5 100644
30--- a/CMakeLists.txt
31+++ b/CMakeLists.txt
32@@ -1,5 +1,5 @@
33 set(CMAKE_LEGACY_CYGWIN_WIN32 0)
34-cmake_minimum_required(VERSION 3.0)
35+cmake_minimum_required(VERSION 3.5)
36
37 project(cJSON
38 VERSION 1.7.18
39--
402.43.0
41
diff --git a/meta-oe/recipes-devtools/cjson/cjson_1.7.18.bb b/meta-oe/recipes-devtools/cjson/cjson_1.7.18.bb
index 33c8c28531..7ece0065ba 100644
--- a/meta-oe/recipes-devtools/cjson/cjson_1.7.18.bb
+++ b/meta-oe/recipes-devtools/cjson/cjson_1.7.18.bb
@@ -6,10 +6,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=218947f77e8cb8e2fa02918dc41c50d0"
6 6
7SRC_URI = "git://github.com/DaveGamble/cJSON.git;branch=master;protocol=https \ 7SRC_URI = "git://github.com/DaveGamble/cJSON.git;branch=master;protocol=https \
8 file://run-ptest \ 8 file://run-ptest \
9 file://0001-allow-build-with-cmake-4.patch \
9 " 10 "
10SRCREV = "acc76239bee01d8e9c858ae2cab296704e52d916" 11SRCREV = "acc76239bee01d8e9c858ae2cab296704e52d916"
11 12
12
13inherit cmake pkgconfig ptest 13inherit cmake pkgconfig ptest
14 14
15RDEPENDS:${PN}-ptest += "cmake" 15RDEPENDS:${PN}-ptest += "cmake"