From c319710ea2e98693b4f921e1ed6f6f6899ac5a93 Mon Sep 17 00:00:00 2001 From: PeterAlfredLee Date: Tue, 3 Mar 2026 16:52:34 +0800 Subject: [PATCH] docs: fix outdated CMake version requirement in README The README stated that CMake 2.8.5+ was required, but CMakeLists.txt requires CMake 3.5+. This inconsistency caused confusion for users with CMake versions between 2.8.5 and 3.5. Also updated library_config/uninstall.cmake to match for consistency. Fixes #988 --- README.md | 2 +- library_config/uninstall.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 99147afdb..9c7ed142c 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ cJSON is written in ANSI C (C89) in order to support as many platforms and compi #### CMake -With CMake, cJSON supports a full blown build system. This way you get the most features. CMake with an equal or higher version than 2.8.5 is supported. With CMake it is recommended to do an out of tree build, meaning the compiled files are put in a directory separate from the source files. So in order to build cJSON with CMake on a Unix platform, make a `build` directory and run CMake inside it. +With CMake, cJSON supports a full blown build system. This way you get the most features. CMake with an equal or higher version than 3.5 is supported. With CMake it is recommended to do an out of tree build, meaning the compiled files are put in a directory separate from the source files. So in order to build cJSON with CMake on a Unix platform, make a `build` directory and run CMake inside it. ``` mkdir build diff --git a/library_config/uninstall.cmake b/library_config/uninstall.cmake index e751ec473..a40066828 100644 --- a/library_config/uninstall.cmake +++ b/library_config/uninstall.cmake @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.5) +cmake_minimum_required(VERSION 3.5) set(MANIFEST "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt")