Commit cd3c6e26 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Thomas Petazzoni
Browse files

libsigrok: enable building C++ bindings



[Thomas:
 - Use BR2_INSTALL_LIBSTDCPP instead of BR2_TOOLCHAIN_BUILDROOT_CXX,
   so that the condition also works with external toolchains.
 - Use a 'if BR2_PACKAGE_LIBSIGROK' instead of duplicating the
   dependency.]

Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent a5a705d2
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -16,6 +16,21 @@ config BR2_PACKAGE_LIBSIGROK

	  http://sigrok.org/wiki/Libsigrok

if BR2_PACKAGE_LIBSIGROK

config BR2_PACKAGE_LIBSIGROKCXX
	bool "build C++ bindings"
	select BR2_PACKAGE_GLIBMM
	depends on BR2_INSTALL_LIBSTDCPP
	help
	  Build libsigrok C++ bindings as well.

comment "C++ bindings need a toolchain w/ C++"
	depends on BR2_PACKAGE_LIBSIGROK
	depends on !BR2_INSTALL_LIBSTDCPP

endif

comment "libsigrok needs a toolchain w/ wchar, threads"
	depends on BR2_USE_MMU
	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+8 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ LIBSIGROK_LICENSE_FILES = COPYING
LIBSIGROK_AUTORECONF = YES
LIBSIGROK_INSTALL_STAGING = YES
LIBSIGROK_DEPENDENCIES = libglib2 libzip host-pkgconf
LIBSIGROK_CONF_OPTS = --disable-bindings --disable-glibtest
LIBSIGROK_CONF_OPTS = --disable-glibtest --disable-java --disable-python

define LIBSIGROK_ADD_MISSING
	mkdir -p $(@D)/autostuff
@@ -46,4 +46,11 @@ ifeq ($(BR2_PACKAGE_GLIBMM),y)
LIBSIGROK_DEPENDENCIES += glibmm
endif

ifeq ($(BR2_PACKAGE_LIBSIGROKCXX),y)
LIBSIGROK_CONF_OPTS += --enable-cxx
LIBSIGROK_DEPENDENCIES += host-autoconf-archive glibmm
else
LIBSIGROK_CONF_OPTS += --disable-cxx
endif

$(eval $(autotools-package))