Failed to include esp-opencv with esp-idf framework

I got the esspresif/opencv component in the folder managed_components and cmake recognizes it.
But it looks like there is a problem with the include search path, because I get

src/main.cpp:1:10: fatal error: opencv2/core.hpp: No such file or directory
    1 | #include <opencv2/core.hpp>

Meanwhile it tried a lot, but didn’t get it to work.

The pio environment:

[env:esp32cam]
platform = espressif32
board = esp32cam
framework = espidf

The idf_component.yml:

dependencies:
  idf:
    version: ">=4.1.0"
  espressif/opencv:
    version: "4.10.0~3"

Any hint is appreciated.

The OpenCV component uses ExternalProject_Add() in the cmakelist to add it as subproject. Looks like idf_component_register() contains only a dummy.

@valeros Is it because of this?

Hi @blueandi, that’s right. Unfortunately, components that rely on `ExternalProject_Add` cannot be used at the moment. Mainly because the underlying IDF build system doesn’t export enough build information to reliably reproduce the build logic.