CMakeLists.txt 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. set(include_dirs port/include port/include/coap libcoap/include libcoap/include/coap2)
  2. set(srcs
  3. "libcoap/src/address.c"
  4. "libcoap/src/async.c"
  5. "libcoap/src/block.c"
  6. "libcoap/src/coap_event.c"
  7. "libcoap/src/coap_hashkey.c"
  8. "libcoap/src/coap_session.c"
  9. "libcoap/src/coap_time.c"
  10. "port/coap_debug.c"
  11. "libcoap/src/encode.c"
  12. "libcoap/src/mem.c"
  13. "libcoap/src/net.c"
  14. "libcoap/src/option.c"
  15. "libcoap/src/pdu.c"
  16. "libcoap/src/resource.c"
  17. "libcoap/src/str.c"
  18. "libcoap/src/subscribe.c"
  19. "libcoap/src/uri.c"
  20. "libcoap/src/coap_io.c"
  21. "port/coap_notls.c"
  22. "port/coap_mbedtls.c")
  23. idf_component_register(SRCS "${srcs}"
  24. INCLUDE_DIRS "${include_dirs}"
  25. REQUIRES lwip mbedtls)
  26. # Silence format truncation warning, until it is fixed upstream
  27. set_source_files_properties(port/coap_debug.c PROPERTIES COMPILE_FLAGS -Wno-format-truncation)
  28. # Needed for coap headers in public builds, also.
  29. #
  30. # TODO: find a way to move this to a port header
  31. target_compile_definitions(${COMPONENT_LIB} PUBLIC WITH_POSIX)