From b5045e4f07a7daedd6a33a7d28a2948d70d51d72 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Sat, 1 Mar 2025 23:31:08 +0800 Subject: [PATCH] try build with cmake 4.0 --- cJSON-1.7.18-port-to-newer-cmake.patch | 9 +++++++++ cjson.spec | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 cJSON-1.7.18-port-to-newer-cmake.patch diff --git a/cJSON-1.7.18-port-to-newer-cmake.patch b/cJSON-1.7.18-port-to-newer-cmake.patch new file mode 100644 index 0000000..70dc006 --- /dev/null +++ b/cJSON-1.7.18-port-to-newer-cmake.patch @@ -0,0 +1,9 @@ +--- cJSON-1.7.18/CMakeLists.txt.orig 2025-03-01 23:29:15.917360200 +0800 ++++ cJSON-1.7.18/CMakeLists.txt 2025-03-01 23:29:35.107497100 +0800 +@@ -1,5 +1,5 @@ + set(CMAKE_LEGACY_CYGWIN_WIN32 0) +-cmake_minimum_required(VERSION 3.0) ++cmake_minimum_required(VERSION 3.0...${CMAKE_VERSION}) + + project(cJSON + VERSION 1.7.18 diff --git a/cjson.spec b/cjson.spec index a02bb38..e84a480 100644 --- a/cjson.spec +++ b/cjson.spec @@ -1,11 +1,12 @@ Name: cjson Version: 1.7.18 -Release: 2 +Release: 3 Summary: Ultralightweight JSON parser in ANSI C License: MIT URL: https://github.com/DaveGamble/cJSON Source0: https://github.com/DaveGamble/cJSON/archive/refs/tags/v%{version}.tar.gz +Patch0: cJSON-1.7.18-port-to-newer-cmake.patch BuildRequires: gcc BuildRequires: cmake @@ -45,6 +46,9 @@ developing applications that use cJSON. %{_includedir}/cjson/ %changelog +* Sat Mar 01 2025 Funda Wang - 1.7.18-3 +- try build with cmake 4.0 + * Mon Nov 04 2024 Funda Wang - 1.7.18-2 - adopt to new cmake macro -- Gitee