mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Ladislav Michl <ladis@linux-mips.org>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] libgpiod: optionally install C++ bindings
Date: Mon, 22 Apr 2019 14:24:24 +0200	[thread overview]
Message-ID: <20190422122424.GA3085@lenoch> (raw)

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

                 reply	other threads:[~2019-04-22 12:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20190422122424.GA3085@lenoch \
    --to=ladis@linux-mips.org \
    --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