mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Alexander Dahl <ada@thorsis.com>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] nlohmann-json: Add new package
Date: Tue,  5 Jul 2022 09:50:06 +0200	[thread overview]
Message-ID: <20220705075006.5054-1-ada@thorsis.com> (raw)

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 <ada@thorsis.com>
---
 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 <ada@thorsis.com>
+#
+# 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




             reply	other threads:[~2022-07-05  7:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-05  7:50 Alexander Dahl [this message]
2022-07-29  6:23 ` [ptxdist] [APPLIED] " Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220705075006.5054-1-ada@thorsis.com \
    --to=ada@thorsis.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox