From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 05 Jul 2022 09:50:44 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1o8dKS-006JiW-PV for lore@lore.pengutronix.de; Tue, 05 Jul 2022 09:50:44 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1o8dKV-0007hv-Eh; Tue, 05 Jul 2022 09:50:43 +0200 Received: from mail.thorsis.com ([92.198.35.195]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1o8dJw-0007gg-K5 for ptxdist@pengutronix.de; Tue, 05 Jul 2022 09:50:09 +0200 Received: from adahl by ada.ifak-system.com with local (Exim 4.92) (envelope-from ) id 1o8dJu-0001Lp-6k for ptxdist@pengutronix.de; Tue, 05 Jul 2022 09:50:06 +0200 From: Alexander Dahl To: ptxdist@pengutronix.de Date: Tue, 5 Jul 2022 09:50:06 +0200 Message-Id: <20220705075006.5054-1-ada@thorsis.com> Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Subject: [ptxdist] [PATCH] nlohmann-json: Add new package X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false While you could just add those header files to your project, it might be easier to have it in one central place in your BSP, especially when using it from more than one application. Signed-off-by: Alexander Dahl --- rules/nlohmann-json.in | 21 ++++++++++++++++++++ rules/nlohmann-json.make | 42 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 rules/nlohmann-json.in create mode 100644 rules/nlohmann-json.make diff --git a/rules/nlohmann-json.in b/rules/nlohmann-json.in new file mode 100644 index 000000000..af2f688ce --- /dev/null +++ b/rules/nlohmann-json.in @@ -0,0 +1,21 @@ +## SECTION=system_libraries + +menuconfig NLOHMANN_JSON + tristate + prompt "JSON for Modern C++ " + select HOST_CMAKE + help + Modern C++11 JSON library with intuitive syntax, trivial + integration, and serious testing. + + https://json.nlohmann.me/ + +if NLOHMANN_JSON + +config NLOHMANN_JSON_BUILD_TESTS + bool + prompt "Build the unit tests" + +endif + +# vim: ft=kconfig noet tw=72 ts=8 sw=8 diff --git a/rules/nlohmann-json.make b/rules/nlohmann-json.make new file mode 100644 index 000000000..4116ac4d1 --- /dev/null +++ b/rules/nlohmann-json.make @@ -0,0 +1,42 @@ +# -*-makefile-*- +# +# Copyright (C) 2021 by Alexander Dahl +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_NLOHMANN_JSON) += nlohmann-json + +# +# Paths and names +# +NLOHMANN_JSON_VERSION := 3.10.5 +NLOHMANN_JSON_MD5 := 5b946f7d892fa55eabec45e76a20286b +NLOHMANN_JSON := nlohmann-json-$(NLOHMANN_JSON_VERSION) +NLOHMANN_JSON_SUFFIX := tar.gz +NLOHMANN_JSON_URL := https://github.com/nlohmann/json/archive/refs/tags/v$(NLOHMANN_JSON_VERSION).$(NLOHMANN_JSON_SUFFIX) +NLOHMANN_JSON_SOURCE := $(SRCDIR)/$(NLOHMANN_JSON).$(NLOHMANN_JSON_SUFFIX) +NLOHMANN_JSON_DIR := $(BUILDDIR)/$(NLOHMANN_JSON) +NLOHMANN_JSON_LICENSE := MIT +NLOHMANN_JSON_LICENSE_FILES := file://LICENSE.MIT;md5=f969127d7b7ed0a8a63c2bbeae002588 + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +NLOHMANN_JSON_CONF_TOOL := cmake +NLOHMANN_JSON_CONF_OPT := \ + $(CROSS_CMAKE_USR) \ + -DJSON_BuildTests:BOOL=$(call ptx/onoff, PTXCONF_NLOHMANN_JSON_BUILD_TESTS) \ + -DJSON_CI:BOOL=OFF \ + -DJSON_Diagnostics:BOOL=OFF \ + -DJSON_ImplicitConversions:BOOL=ON \ + -DJSON_Install:BOOL=ON \ + -DJSON_MultipleHeaders:BOOL=OFF \ + -DJSON_SystemInclude:BOOL=OFF + +# vim: ft=make noet tw=72 ts=8 sw=8 base-commit: 7384b37919cb66e12ff15b4264325cb5eba911c3 -- 2.30.2