2019-04-28 03:38:23 -04:00
|
|
|
set(include_dirs port/include port/include/coap libcoap/include libcoap/include/coap2)
|
2018-01-11 21:49:13 -05:00
|
|
|
|
2019-06-21 02:29:32 -04:00
|
|
|
set(srcs
|
|
|
|
"libcoap/src/address.c"
|
|
|
|
"libcoap/src/async.c"
|
|
|
|
"libcoap/src/block.c"
|
|
|
|
"libcoap/src/coap_event.c"
|
|
|
|
"libcoap/src/coap_hashkey.c"
|
|
|
|
"libcoap/src/coap_session.c"
|
|
|
|
"libcoap/src/coap_time.c"
|
|
|
|
"libcoap/src/coap_debug.c"
|
|
|
|
"libcoap/src/encode.c"
|
|
|
|
"libcoap/src/mem.c"
|
|
|
|
"libcoap/src/net.c"
|
|
|
|
"libcoap/src/option.c"
|
|
|
|
"libcoap/src/pdu.c"
|
|
|
|
"libcoap/src/resource.c"
|
|
|
|
"libcoap/src/str.c"
|
|
|
|
"libcoap/src/subscribe.c"
|
|
|
|
"libcoap/src/uri.c"
|
|
|
|
"libcoap/src/coap_notls.c"
|
|
|
|
"port/coap_io.c")
|
2018-01-11 21:49:13 -05:00
|
|
|
|
2018-03-22 02:27:10 -04:00
|
|
|
set(COMPONENT_REQUIRES lwip)
|
|
|
|
|
2019-04-28 03:38:23 -04:00
|
|
|
idf_component_register(SRCS "${srcs}"
|
2019-06-21 02:29:32 -04:00
|
|
|
INCLUDE_DIRS "${include_dirs}"
|
|
|
|
REQUIRES lwip)
|
2018-01-11 21:49:13 -05:00
|
|
|
|
2019-03-28 04:28:25 -04:00
|
|
|
# Silence format truncation warning, until it is fixed upstream
|
|
|
|
set_source_files_properties(libcoap/src/coap_debug.c PROPERTIES COMPILE_FLAGS -Wno-format-truncation)
|
2019-05-09 22:53:08 -04:00
|
|
|
|
|
|
|
# Needed for coap headers in public builds, also.
|
|
|
|
#
|
|
|
|
# TODO: find a way to move this to a port header
|
|
|
|
target_compile_definitions(${COMPONENT_LIB} PUBLIC WITH_POSIX)
|
|
|
|
|