mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2025-12-16 15:25:53 +01:00
libiio: fix build when python bindings are enabled
See https://github.com/openembedded/meta-openembedded/issues/248 Signed-off-by: Sam Van Den Berge <sam.van.den.berge@telenet.be> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
f6f0d171b0
commit
51f98865da
|
|
@ -12,13 +12,15 @@ UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
|
|||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
inherit cmake python3native systemd
|
||||
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
|
||||
|
||||
EXTRA_OECMAKE = " \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DUDEV_RULES_INSTALL_DIR=${nonarch_base_libdir}/udev/rules.d \
|
||||
|
|
@ -31,8 +33,6 @@ PACKAGECONFIG[usb_backend] = "-DWITH_USB_BACKEND=ON,-DWITH_USB_BACKEND=OFF,libus
|
|||
PACKAGECONFIG[network_backend] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF,libxml2"
|
||||
PACKAGECONFIG[libiio-python3] = "-DPYTHON_BINDINGS=ON,-DPYTHON_BINDINGS=OFF"
|
||||
|
||||
inherit ${@bb.utils.contains('PACKAGECONFIG', 'libiio-python3', 'distutils3-base', '', d)}
|
||||
|
||||
PACKAGES =+ "${PN}-iiod ${PN}-tests ${PN}-${PYTHON_PN}"
|
||||
|
||||
RDEPENDS_${PN}-${PYTHON_PN} = "${PN} ${PYTHON_PN}-ctypes ${PYTHON_PN}-stringold"
|
||||
|
|
@ -46,3 +46,23 @@ FILES_${PN}-${PYTHON_PN} = "${PYTHON_SITEPACKAGES_DIR}"
|
|||
|
||||
SYSTEMD_PACKAGES = "${PN}-iiod"
|
||||
SYSTEMD_SERVICE_${PN}-iiod = "iiod.service"
|
||||
|
||||
# Explicitly define do_configure, do_compile and do_install because both cmake and setuptools3 have
|
||||
# EXPORT_FUNCTIONS do_configure do_compile do_install
|
||||
do_configure() {
|
||||
cmake_do_configure
|
||||
}
|
||||
|
||||
do_compile() {
|
||||
if ${@bb.utils.contains('PACKAGECONFIG', 'libiio-python3', 'true', 'false', d)}; then
|
||||
distutils3_do_compile
|
||||
fi
|
||||
cmake_do_compile
|
||||
}
|
||||
|
||||
do_install() {
|
||||
if ${@bb.utils.contains('PACKAGECONFIG', 'libiio-python3', 'true', 'false', d)}; then
|
||||
distutils3_do_install
|
||||
fi
|
||||
cmake_do_install
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user