CMakeLists.txt 909 B

123456789101112131415161718192021222324252627282930313233343536
  1. idf_build_get_property(target IDF_TARGET)
  2. if(${target} STREQUAL "linux")
  3. # Header only library for linux
  4. idf_component_register(INCLUDE_DIRS include
  5. SRCS protocol_examples_utils.c)
  6. return()
  7. endif()
  8. set(srcs "stdin_out.c"
  9. "addr_from_stdin.c"
  10. "connect.c"
  11. "wifi_connect.c"
  12. "protocol_examples_utils.c")
  13. if(CONFIG_EXAMPLE_PROVIDE_WIFI_CONSOLE_CMD)
  14. list(APPEND srcs "console_cmd.c")
  15. endif()
  16. if(CONFIG_EXAMPLE_CONNECT_ETHERNET)
  17. list(APPEND srcs "eth_connect.c")
  18. endif()
  19. idf_component_register(SRCS "${srcs}"
  20. INCLUDE_DIRS "include"
  21. PRIV_REQUIRES esp_netif driver esp_wifi vfs)
  22. if(CONFIG_EXAMPLE_PROVIDE_WIFI_CONSOLE_CMD)
  23. idf_component_optional_requires(PRIVATE console)
  24. endif()
  25. if(CONFIG_EXAMPLE_CONNECT_ETHERNET)
  26. idf_component_optional_requires(PRIVATE esp_eth)
  27. endif()