Message ID | bc4534b95dda219e91bd9b0de2ed758711bf53d3.1658328570.git.baruch@tkos.co.il |
---|---|
State | Accepted |
Headers | show |
Series | package/cjson: add option to build cJSON_Utils | expand |
On Wed, 20 Jul 2022 17:49:30 +0300 Baruch Siach via buildroot <buildroot@buildroot.org> wrote: > 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> > --- > package/cjson/Config.in | 10 ++++++++++ > package/cjson/cjson.mk | 6 ++++++ > 2 files changed, 16 insertions(+) Applied to master, thanks. Thomas
diff --git a/package/cjson/Config.in b/package/cjson/Config.in index ee18fced5cc6..b583e487569c 100644 --- a/package/cjson/Config.in +++ b/package/cjson/Config.in @@ -5,3 +5,13 @@ 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 diff --git a/package/cjson/cjson.mk b/package/cjson/cjson.mk index ac8db5701f27..ad9d76a4bab2 100644 --- a/package/cjson/cjson.mk +++ b/package/cjson/cjson.mk @@ -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))
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> --- package/cjson/Config.in | 10 ++++++++++ package/cjson/cjson.mk | 6 ++++++ 2 files changed, 16 insertions(+)