package/opencv4: BR2_PACKAGE_OPENCV4_LIB_DNN requires protobuf

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@benettiengineering.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Giulio Benetti 2022-08-08 00:25:28 +02:00 committed by Thomas Petazzoni
parent 6dcaa20ca4
commit b0d3c25cc8

View File

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