diff --git a/package/cjson/0001-make_compatible_with_cmake_4.0.patch b/package/cjson/0001-make_compatible_with_cmake_4.0.patch new file mode 100644 index 0000000000..1fe5cd43ef --- /dev/null +++ b/package/cjson/0001-make_compatible_with_cmake_4.0.patch @@ -0,0 +1,34 @@ +From 58bc7c823c2e39f1a626ec4da86952bc6819bd6b Mon Sep 17 00:00:00 2001 +From: Markus Vieth +Date: Sun, 30 Mar 2025 11:12:07 +0200 +Subject: [PATCH] Make compatible with CMake 4.0 When trying to build with + CMake 4.0, the following error is shown: + +CMake Error at CMakeLists.txt:2 (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. + +This change raises the minimum required CMake version to 3.5 and thus makes the project compatible with CMake 4.0 + +Signed-off-by: BenoƮt Monin +Upstream: https://github.com/DaveGamble/cJSON/pull/935 +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 36a6cb57..9428da58 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,5 @@ + set(CMAKE_LEGACY_CYGWIN_WIN32 0) +-cmake_minimum_required(VERSION 3.0) ++cmake_minimum_required(VERSION 3.5) + + project(cJSON + VERSION 1.7.18