fix(opencv): do not try to install sample files

- don't install sample files if PACKAGECONFIG:samples is disabled

Signed-off-by: Andrej Valek <andrej.v@skyrain.eu>
(cherry picked from commit d025faa488)
This commit is contained in:
Andrej Valek 2025-04-17 08:56:52 +02:00 committed by github-actions[bot]
parent aa1a3c026b
commit 177dc38c19

View File

@ -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