diff options
| author | Alper Ak <alperyasinak1@gmail.com> | 2025-07-08 22:56:19 +0300 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2025-07-09 09:16:05 -0700 |
| commit | ed64f4995a6312bcfad598c8a28ce08369f8520a (patch) | |
| tree | 3e888892d95c8371fc85a1a02c5f778cc5c1db0b | |
| parent | 2147652aba4da37147b142944e959ec1e2966281 (diff) | |
| download | meta-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.patch | 41 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/cjson/cjson_1.7.18.bb | 2 |
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 @@ | |||
| 1 | From 8622490d650ba4d107561a0e8f3cf881fa0247c7 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alper Ak <alperyasinak1@gmail.com> | ||
| 3 | Date: Tue, 8 Jul 2025 15:09:11 +0300 | ||
| 4 | Subject: [PATCH] cmake: Set minimum required version to 3.5 for CMake 4+ | ||
| 5 | compatibility | ||
| 6 | |||
| 7 | Fix: | ||
| 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 | |||
| 21 | Upstream-Status: Submitted [https://github.com/DaveGamble/cJSON/pull/935] | ||
| 22 | |||
| 23 | Signed-off-by: Alper Ak <alperyasinak1@gmail.com> | ||
| 24 | --- | ||
| 25 | CMakeLists.txt | 2 +- | ||
| 26 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 27 | |||
| 28 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| 29 | index 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 | -- | ||
| 40 | 2.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 | ||
| 7 | SRC_URI = "git://github.com/DaveGamble/cJSON.git;branch=master;protocol=https \ | 7 | SRC_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 | " |
| 10 | SRCREV = "acc76239bee01d8e9c858ae2cab296704e52d916" | 11 | SRCREV = "acc76239bee01d8e9c858ae2cab296704e52d916" |
| 11 | 12 | ||
| 12 | |||
| 13 | inherit cmake pkgconfig ptest | 13 | inherit cmake pkgconfig ptest |
| 14 | 14 | ||
| 15 | RDEPENDS:${PN}-ptest += "cmake" | 15 | RDEPENDS:${PN}-ptest += "cmake" |
