CMakeLists.txt 950 B

1234567891011121314151617181920212223242526272829
  1. set(srcs "")
  2. set(priv_include_dirs "")
  3. set(requires bt nvs_flash protocomm esp_netif protobuf-c)
  4. set(priv_requires json esp_timer)
  5. if(CONFIG_BT_NIMBLE_ENABLED)
  6. list(APPEND srcs "src/nimble_ota.c")
  7. if(CONFIG_OTA_WITH_PROTOCOMM)
  8. list(APPEND srcs
  9. "src/scheme_ble.c"
  10. "src/manager.c"
  11. "src/handlers.c"
  12. "src/decrypt_ota_file.c"
  13. "proto-c/ota_send_file.pb-c.c")
  14. list(APPEND priv_include_dirs proto-c "${IDF_PATH}/components/protocomm/proto-c")
  15. endif()
  16. else()
  17. list(APPEND srcs "src/ble_ota.c")
  18. endif()
  19. idf_component_register(SRCS "${srcs}"
  20. INCLUDE_DIRS "include"
  21. PRIV_INCLUDE_DIRS "${priv_include_dirs}"
  22. REQUIRES "${requires}"
  23. PRIV_REQUIRES "${priv_requires}")
  24. # include(package_manager)
  25. # cu_pkg_define_version(${CMAKE_CURRENT_LIST_DIR})