From 177dc38c198e5a3049ad01d0b0a0dae1030105ed Mon Sep 17 00:00:00 2001 From: Andrej Valek Date: Thu, 17 Apr 2025 08:56:52 +0200 Subject: fix(opencv): do not try to install sample files - don't install sample files if PACKAGECONFIG:samples is disabled Signed-off-by: Andrej Valek (cherry picked from commit d025faa488801bdcf4ea0366f6ed19b07f408d5b) --- recipes-support/opencv/opencv_4.6.0.imx.bb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/recipes-support/opencv/opencv_4.6.0.imx.bb b/recipes-support/opencv/opencv_4.6.0.imx.bb index 6d13d107..3b455534 100644 --- a/recipes-support/opencv/opencv_4.6.0.imx.bb +++ b/recipes-support/opencv/opencv_4.6.0.imx.bb @@ -302,10 +302,12 @@ EXTRA_OECMAKE:append = " -DBUILD_opencv_cvv=OFF" do_install:append() { ln -sf opencv4/opencv2 ${D}${includedir}/opencv2 - install -d ${D}${datadir}/OpenCV/samples/data - cp -r ${S}/samples/data/* ${D}${datadir}/OpenCV/samples/data - install -d ${D}${datadir}/OpenCV/samples/bin/ - cp -f bin/example_* ${D}${datadir}/OpenCV/samples/bin/ + if ${@bb.utils.contains('PACKAGECONFIG', 'samples', 'true', 'false', d)}; then + install -d ${D}${datadir}/OpenCV/samples/data + cp -r ${S}/samples/data/* ${D}${datadir}/OpenCV/samples/data + install -d ${D}${datadir}/OpenCV/samples/bin/ + cp -f bin/example_* ${D}${datadir}/OpenCV/samples/bin/ + fi if ${@bb.utils.contains('PACKAGECONFIG', 'tests-imx', 'true', 'false', d)}; then cp -r share/opencv4/testdata/cv/face/* ${D}${datadir}/opencv4/testdata/cv/face/ fi -- cgit v1.2.3-54-g00ecf