CMakeLists.txt 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. set(include_dirs include/common
  2. include/security
  3. include/transports)
  4. set(priv_include_dirs proto-c src/common)
  5. set(srcs
  6. "src/common/protocomm.c"
  7. "src/security/security0.c"
  8. "src/security/security1.c"
  9. "proto-c/constants.pb-c.c"
  10. "proto-c/sec0.pb-c.c"
  11. "proto-c/sec1.pb-c.c"
  12. "proto-c/session.pb-c.c"
  13. "src/transports/protocomm_console.c"
  14. "src/transports/protocomm_httpd.c")
  15. if(CONFIG_BT_ENABLED)
  16. if(CONFIG_BT_BLUEDROID_ENABLED)
  17. list(APPEND srcs
  18. "src/simple_ble/simple_ble.c"
  19. "src/transports/protocomm_ble.c")
  20. list(APPEND priv_include_dirs
  21. src/simple_ble)
  22. endif()
  23. if(CONFIG_BT_NIMBLE_ENABLED)
  24. list(APPEND srcs
  25. "src/transports/protocomm_nimble.c")
  26. endif()
  27. endif()
  28. idf_component_register(SRCS "${srcs}"
  29. INCLUDE_DIRS "${include_dirs}"
  30. PRIV_INCLUDE_DIRS "${priv_include_dirs}"
  31. PRIV_REQUIRES protobuf-c mbedtls console esp_http_server
  32. REQUIRES bt)