mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] nlohmann-json: Add new package
@ 2022-07-05  7:50 Alexander Dahl
  2022-07-29  6:23 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Dahl @ 2022-07-05  7:50 UTC (permalink / raw)
  To: ptxdist

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-29  6:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-05  7:50 [ptxdist] [PATCH] nlohmann-json: Add new package Alexander Dahl
2022-07-29  6:23 ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox