mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] libgpiod: optionally install C++ bindings
@ 2019-04-22 12:24 Ladislav Michl
  0 siblings, 0 replies; only message in thread
From: Ladislav Michl @ 2019-04-22 12:24 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
 rules/libgpiod.in   | 9 ++++++++-
 rules/libgpiod.make | 5 ++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/rules/libgpiod.in b/rules/libgpiod.in
index 488af66f4..8e2217db5 100644
--- a/rules/libgpiod.in
+++ b/rules/libgpiod.in
@@ -3,7 +3,8 @@
 menuconfig LIBGPIOD
 	tristate
 	prompt "libgpiod                      "
-	select PYTHON3 if LIBGPIOD_PYTHON3
+	select GCCLIBS_CXX	if LIBGPIOD_CXX
+	select PYTHON3		if LIBGPIOD_PYTHON3
 	help
 	  libgpiod is a library accompanied by a set of tools for
 	  interacting with the Linux GPIO character device.
@@ -56,6 +57,12 @@ config LIBGPIOD_GPIOMON
 	help
 	  Waits for events on a GPIO line
 
+config LIBGPIOD_CXX
+	bool
+	prompt "Install C++ bindings"
+	help
+	  Provides bindings for C++
+
 config LIBGPIOD_PYTHON3
 	bool
 	prompt "Install python3 bindings"
diff --git a/rules/libgpiod.make b/rules/libgpiod.make
index 308960e34..3d63895a1 100644
--- a/rules/libgpiod.make
+++ b/rules/libgpiod.make
@@ -36,7 +36,7 @@ LIBGPIOD_CONF_OPT	:= \
 	--$(call ptx/endis, PTXCONF_LIBGPIOD_TOOLS)-tools \
 	--disable-install-tests \
 	--disable-tests \
-	--disable-bindings-cxx \
+	--$(call ptx/endis, PTXCONF_LIBGPIOD_CXX)-bindings-cxx \
 	--$(call ptx/endis, PTXCONF_LIBGPIOD_PYTHON3)-bindings-python
 
 LIBGPIOD_CONF_ENV := \
@@ -76,6 +76,9 @@ $(STATEDIR)/libgpiod.targetinstall:
 			/usr/bin/$$tool); \
 	done
 
+ifdef PTXCONF_LIBGPIOD_CXX
+	@$(call install_lib, libgpiod, 0, 0, 0644, libgpiodcxx)
+endif
 ifdef PTXCONF_LIBGPIOD_PYTHON3
 	@$(call install_glob, libgpiod, 0, 0, -, $(PYTHON3_SITEPACKAGES),, gpiod.*)
 endif
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-04-22 12:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-22 12:24 [ptxdist] [PATCH] libgpiod: optionally install C++ bindings Ladislav Michl

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