[Buildroot] [PATCH] package/opencv: depend on webp mux/demux

Alessandro Rubini <[email protected]> Sun, 26 Jul 2026 23:59:31 +0200
Newsgroups net.busybox.buildroot
Organization GnuDD, Device Drivers, Embedded Systems, Courses
Message-ID <amaDQ/[email protected]>
Without this dependency, autoconfiguration fails:

    CMake Error: The following variables are used in this project,
         but they are set to NOTFOUND.
    Please set them or make sure they are set and tested correctly
         in the CMake files:
    WEBP_DEMUX_LIBRARY
    linked by target "opencv_imgcodecs"
         in directory [...]/build/opencv4-4.13.0/modules/imgcodecs
    WEBP_MUX_LIBRARY
    linked by target "opencv_imgcodecs"
         in directory [...]/build/opencv4-4.13.0/modules/imgcodecs

Signed-off-by: Alessandro Rubini <[email protected]>
---
 package/opencv4/Config.in  | 2 ++
 package/opencv4/opencv4.mk | 1 +
 2 files changed, 3 insertions(+)

diff --git a/package/opencv4/Config.in b/package/opencv4/Config.in
index 47c1cf3f4a..856f3e8abd 100644
--- a/package/opencv4/Config.in
+++ b/package/opencv4/Config.in
@@ -7,6 +7,8 @@ menuconfig BR2_PACKAGE_OPENCV4
 	depends on !BR2_STATIC_LIBS # include dlfcn.h
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
 	select BR2_PACKAGE_ZLIB
+	select BR2_PACKAGE_WEBP_DEMUX
+	select BR2_PACKAGE_WEBP_MUX
 	help
 	  OpenCV (Open Source Computer Vision) is a library of
 	  programming functions for real time computer vision.
diff --git a/package/opencv4/opencv4.mk b/package/opencv4/opencv4.mk
index 0e2567eb6f..b08e8a33d4 100644
--- a/package/opencv4/opencv4.mk
+++ b/package/opencv4/opencv4.mk
@@ -261,6 +261,7 @@ OPENCV4_CONF_OPTS += \
 	-DWITH_XINE=OFF
 
 OPENCV4_DEPENDENCIES += host-pkgconf zlib
+OPENCV4_DEPENDENCIES += webp
 
 ifeq ($(BR2_PACKAGE_OPENCV4_CONTRIB),y)
 # OPENCV4 depends on OPENCV4_CONTRIB, and not the other way around.
-- 
2.47.3
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot