CMakeLists.txt 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. idf_build_get_property(target IDF_TARGET)
  2. if(${target} STREQUAL "linux")
  3. return() # This component is not supported by the POSIX/Linux simulator
  4. endif()
  5. list(APPEND sources "vfs.c"
  6. "vfs_eventfd.c"
  7. "vfs_uart.c"
  8. "vfs_semihost.c"
  9. "vfs_console.c")
  10. list(APPEND pr driver
  11. esp_timer)
  12. idf_component_register(SRCS ${sources}
  13. LDFRAGMENTS "linker.lf"
  14. INCLUDE_DIRS include
  15. PRIV_INCLUDE_DIRS private_include
  16. PRIV_REQUIRES ${pr})
  17. if(CONFIG_ESP_CONSOLE_USB_CDC)
  18. target_sources(${COMPONENT_LIB} PRIVATE "vfs_cdcacm.c")
  19. endif()
  20. if(CONFIG_ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG OR CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG)
  21. target_sources(${COMPONENT_LIB} PRIVATE "vfs_usb_serial_jtag.c")
  22. endif()
  23. # Some newlib syscalls are implemented in vfs.c, make sure these are always
  24. # seen by the linker
  25. target_link_libraries(${COMPONENT_LIB} INTERFACE "-u vfs_include_syscalls_impl")