cjson: fix build with CMake 4
This commit is contained in:
@@ -22,11 +22,24 @@ stdenv.mkDerivation rec {
|
||||
lib.cmakeBool "ENABLE_CUSTOM_COMPILER_FLAGS" false
|
||||
);
|
||||
|
||||
# cJSON actually uses C99 standard, not C89
|
||||
# https://github.com/DaveGamble/cJSON/issues/275
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt --replace -std=c89 -std=c99
|
||||
'';
|
||||
postPatch =
|
||||
# cJSON actually uses C99 standard, not C89
|
||||
# https://github.com/DaveGamble/cJSON/issues/275
|
||||
''
|
||||
substituteInPlace CMakeLists.txt --replace -std=c89 -std=c99
|
||||
''
|
||||
# Fix the build with CMake 4.
|
||||
#
|
||||
# See:
|
||||
# * <https://github.com/DaveGamble/cJSON/issues/946>
|
||||
# * <https://github.com/DaveGamble/cJSON/pull/935>
|
||||
# * <https://github.com/DaveGamble/cJSON/pull/949>
|
||||
+ ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail \
|
||||
'cmake_minimum_required(VERSION 3.0)' \
|
||||
'cmake_minimum_required(VERSION 3.10)'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/DaveGamble/cJSON";
|
||||
|
||||
Reference in New Issue
Block a user