Very easy solution!
As there are no source files (SRCS) the library must be linked with INTERFACE attribute
idf_component_register(INCLUDE_DIRS .)
add_prebuilt_library(libprebuilt "libprebuilt.a"
PRIV_REQUIRES spi_flash app_update log)
target_link_libraries(${COMPONENT_LIB} INTERFACE ...
Search found 2 matches
- Fri Jul 17, 2020 9:05 am
- Forum: ESP-IDF
- Topic: Creating a component from a prebuilt lib
- Replies: 2
- Views: 3969
- Wed Jul 08, 2020 1:52 pm
- Forum: ESP-IDF
- Topic: Creating a component from a prebuilt lib
- Replies: 2
- Views: 3969
Creating a component from a prebuilt lib
Hello,
I want to create custom components with prebuilt libraries, for example:
Component name foo
Component files: foo.a foo.h
I have been trying to create this component from the import_prebuilt example, but in that example
the lib is imported directly to the main component.
I modified the ...
I want to create custom components with prebuilt libraries, for example:
Component name foo
Component files: foo.a foo.h
I have been trying to create this component from the import_prebuilt example, but in that example
the lib is imported directly to the main component.
I modified the ...