[Buildroot] [git commit branch/2022.02.x] package/opencv4: BR2_PACKAGE_OPENCV4_LIB_DNN requires protobuf
Peter Korsgaard
peter at korsgaard.com
Fri Sep 16 12:20:46 UTC 2022
commit: https://git.buildroot.net/buildroot/commit/?id=7bce3d6a97393772b4ed9da35fd3991977b7ec19
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2022.02.x
Opencv4 requires protobuf library otherwise it disables DNN:
```
if(NOT HAVE_PROTOBUF)
ocv_module_disable(opencv_dnn)
endif()
```
https://github.com/opencv/opencv/blob/4.x/modules/dnn/CMakeLists.txt#L5-L7
So let's "select BR2_PACKAGE_OPENCV4_WITH_PROTOBUF" if
BR2_PACKAGE_OPENCV4_LIB_DNN is enabled.
Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
(cherry picked from commit b0d3c25cc8017e92dbdedf1a1dde6f4dc4408332)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
package/opencv4/Config.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/package/opencv4/Config.in b/package/opencv4/Config.in
index d7a391a40a..5b07f52ba1 100644
--- a/package/opencv4/Config.in
+++ b/package/opencv4/Config.in
@@ -34,11 +34,14 @@ config BR2_PACKAGE_OPENCV4_LIB_DNN
bool "dnn"
# dnn needs fenv.h which is not provided by uclibc
depends on !BR2_TOOLCHAIN_USES_UCLIBC
+ depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
+ select BR2_PACKAGE_OPENCV4_WITH_PROTOBUF
help
Include opencv_dnn (Deep Neural Networks) module into the
OpenCV build.
comment "dnn needs a glibc or musl toolchain"
+ depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_USES_UCLIBC
config BR2_PACKAGE_OPENCV4_LIB_FEATURES2D
More information about the buildroot
mailing list