mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
22cf5a61ef
In cmakev2, the component CMakeLists.txt files are evaluated recursively
based on the component dependencies. This means that variables from
previously evaluated components are set and available in the scope of
the currently evaluated component. It is necessary to initialize every
variable that is used.
Fixes: 56e0c11bb6 ("feat(usb_cdc_console): moved usb-cdc ROM console to n..")
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
20 lines
609 B
CMake
20 lines
609 B
CMake
idf_build_get_property(target IDF_TARGET)
|
|
|
|
set(srcs)
|
|
|
|
if(CONFIG_ESP_CONSOLE_USB_CDC)
|
|
list(APPEND srcs "usb_console.c")
|
|
endif()
|
|
|
|
idf_component_register(SRCS ${srcs}
|
|
INCLUDE_DIRS include
|
|
PRIV_REQUIRES esp_timer
|
|
LDFRAGMENTS linker.lf
|
|
)
|
|
|
|
if(CONFIG_VFS_SUPPORT_IO AND CONFIG_ESP_CONSOLE_USB_CDC)
|
|
target_link_libraries(${COMPONENT_LIB} PUBLIC idf::vfs)
|
|
target_sources(${COMPONENT_LIB} PRIVATE "vfs_cdcacm.c")
|
|
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u esp_vfs_dev_cdcacm_include_dev_init")
|
|
endif()
|