Build process fails during compilation:
In file included from ../components/test/test.cpp:1:0:
../components/test/include/test.h:3:17: fatal error: nvs.h: No such file or directory
Build successful. Same as building with make.
Hi @bmakovecki,
In the CMake build system, components need to declare their dependencies (apart from some common dependencies).
If you add this line before register_component() in component/test/CMakeLists.txt, it will build:
```
set(COMPONENT_REQUIRES nvs_flash)
````
(Note: There is also COMPONENT_PRIV_REQUIRES if a header is only used to build the component, but not needed to include that component's public headers. Full details here: https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system-cmake.html#when-writing-a-component
Made a copy of esp-idf\components\esp-eth and named the folder ethernet and it would build.
Most helpful comment
Hi @bmakovecki,
In the CMake build system, components need to declare their dependencies (apart from some common dependencies).
If you add this line before register_component() in component/test/CMakeLists.txt, it will build:
```
set(COMPONENT_REQUIRES nvs_flash)
````
(Note: There is also COMPONENT_PRIV_REQUIRES if a header is only used to build the component, but not needed to include that component's public headers. Full details here: https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system-cmake.html#when-writing-a-component