aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorNandor Han <nandor.han@vaisala.com>2021-10-01 15:41:33 +0300
committerArmin Kuster <akuster808@gmail.com>2021-10-07 08:23:51 -0700
commitd056cc93906436b1be4a56b51770f2e2c8bf7c9c (patch)
tree7dc1d31bb58e346431986d8bd859fcefac08bcc4 /meta-oe
parentf16efc00b7fcdbfa8c53e35c1fcebed5c06d975e (diff)
downloadmeta-openembedded-contrib-d056cc93906436b1be4a56b51770f2e2c8bf7c9c.tar.gz
libiio: depend on avahi only when network backed is used
The `avahi` dependency is needed only when network backend is used. The current dependency configuration will add the `avahi` dependency regardless if network backend is used or not. Move the `avahi` dependency to be part of `PACKAGECONFIG` configuration which will insert the dependency only when needed. Signed-off-by: Nandor Han <nandor.han@vaisala.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-support/libiio/libiio_git.bb8
1 files changed, 6 insertions, 2 deletions
diff --git a/meta-oe/recipes-support/libiio/libiio_git.bb b/meta-oe/recipes-support/libiio/libiio_git.bb
index 6ac534a288..488d4e3b0b 100644
--- a/meta-oe/recipes-support/libiio/libiio_git.bb
+++ b/meta-oe/recipes-support/libiio/libiio_git.bb
@@ -18,7 +18,6 @@ DISTUTILS_SETUP_PATH ?= "${B}/bindings/python/"
DEPENDS = " \
flex-native bison-native libaio \
- ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
"
inherit cmake python3native systemd setuptools3
@@ -31,8 +30,13 @@ EXTRA_OECMAKE = " \
PACKAGECONFIG ??= "usb_backend network_backend serial_backend"
+NETWORK_BACKEND_DEPENDENCIES = "\
+ libxml2 \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
+"
+
PACKAGECONFIG[usb_backend] = "-DWITH_USB_BACKEND=ON,-DWITH_USB_BACKEND=OFF,libusb1 libxml2"
-PACKAGECONFIG[network_backend] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF,libxml2"
+PACKAGECONFIG[network_backend] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF, ${NETWORK_BACKEND_DEPENDENCIES}"
PACKAGECONFIG[serial_backend] = "-DWITH_SERIAL_BACKEND=ON,-DWITH_SERIAL_BACKEND=off,libserialport libxml2"
PACKAGECONFIG[libiio-python3] = "-DPYTHON_BINDINGS=ON,-DPYTHON_BINDINGS=OFF"