![]() Hope this helps! If something isn't clear, please don't hesitate to ask.Ĭould you please share your project code (either as a. cmakelistsįor an IDF example with multiple source files, please see. More on writing component CMakeLists.txt files. The concept of component dependencies is explained in the docs here. You can still use standard CMake target_include_directories and target_link_libraries, if you like. In fact, idf_component_register is just a wrapper for some of these functions. In modern CMake, each library declares its include directories using target_include_directories command, and libraries express dependencies on each other using target_link_libraries. If you are familiar with "modern CMake", you will find the concept very similar. ![]() Try to define include directories at component level instead. something), this is usually a bad pattern. If you have to specify an include directory one level above your component directory (such as. The main idea of components is that you declare include directories at component level and then specify dependencies between components. If you are using some other components aside from "helper", you have to list them as well. This tells the build system that the include directories and compilation flags of "helper" have to be propagated to the "main" component. This component still has one source file, but this time it declares a dependency on "helper" component. Code: Select all idf_component_register(SRCS main.c REQUIRES helper)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |