package/cjson: add option to build cJSON_Utils

cJSON_Utils adds support for a few additional JSON RFCs. The size
increase is small (around 12K for ARM32), but it is more than half the
size of cJSON itself. So add a separate config option for cJSON_Utils.

Cc: Danomi Manchego <danomimanchego123@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Baruch Siach 2022-07-20 17:49:30 +03:00 committed by Thomas Petazzoni
parent 3d4a5a77e5
commit bfdcad485d
2 changed files with 17 additions and 0 deletions

View File

@ -5,3 +5,14 @@ config BR2_PACKAGE_CJSON
ANSI-C compliant JSON parser, under MIT license.
https://github.com/DaveGamble/cJSON
if BR2_PACKAGE_CJSON
config BR2_PACKAGE_CJSON_UTILS
bool "cJSON utils"
help
Supplementary library with support for JSON Pointer
(RFC-6901), JSON Patch (RFC-6902), JSON Merge Patch
(RFC-7386), and more.
endif

View File

@ -25,4 +25,10 @@ else
CJSON_CONF_OPTS += -DBUILD_SHARED_AND_STATIC_LIBS=OFF
endif
ifeq ($(BR2_PACKAGE_CJSON_UTILS),y)
CJSON_CONF_OPTS += -DENABLE_CJSON_UTILS=ON
else
CJSON_CONF_OPTS += -DENABLE_CJSON_UTILS=OFF
endif
$(eval $(cmake-package))