CMakeLists.txt 1.0 KB

12345678910111213141516171819202122232425262728293031
  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. set(srcs)
  6. set(include)
  7. set(priv_include)
  8. # As CONFIG_USB_OTG_SUPPORTED comes from Kconfig, it is not evaluated yet
  9. # when components are being registered.
  10. # Thus, always add the (private) requirements, regardless of Kconfig
  11. set(priv_require esp_driver_gpio) # usb_phy driver relies on gpio driver API
  12. if(CONFIG_USB_OTG_SUPPORTED)
  13. list(APPEND srcs "hcd_dwc.c"
  14. "hub.c"
  15. "usb_helpers.c"
  16. "usb_host.c"
  17. "usb_private.c"
  18. "usbh.c"
  19. "usb_phy.c")
  20. list(APPEND include "include")
  21. list(APPEND priv_include "private_include")
  22. endif()
  23. idf_component_register(SRCS ${srcs}
  24. INCLUDE_DIRS ${include}
  25. PRIV_INCLUDE_DIRS ${priv_include}
  26. PRIV_REQUIRES ${priv_require}
  27. )