2019-04-28 07:38:23 +00:00
|
|
|
set(include_dirs port/include port/include/coap libcoap/include libcoap/include/coap2)
|
2018-01-12 02:49:13 +00:00
|
|
|
|
2020-11-10 07:40:01 +00:00
|
|
|
set(srcs
|
2019-06-21 06:29:32 +00:00
|
|
|
"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"
|
2019-04-13 11:15:28 +00:00
|
|
|
"port/coap_debug.c"
|
2019-06-21 06:29:32 +00:00
|
|
|
"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"
|
2019-04-13 11:15:28 +00:00
|
|
|
"libcoap/src/coap_io.c"
|
2019-08-28 09:03:17 +00:00
|
|
|
"port/coap_notls.c"
|
2019-04-13 11:15:28 +00:00
|
|
|
"port/coap_mbedtls.c")
|
2018-01-12 02:49:13 +00:00
|
|
|
|
2019-04-28 07:38:23 +00:00
|
|
|
idf_component_register(SRCS "${srcs}"
|
2019-06-21 06:29:32 +00:00
|
|
|
INCLUDE_DIRS "${include_dirs}"
|
2019-07-31 10:51:25 +00:00
|
|
|
REQUIRES lwip mbedtls)
|
2018-01-12 02:49:13 +00:00
|
|
|
|
2019-03-28 08:28:25 +00:00
|
|
|
# Silence format truncation warning, until it is fixed upstream
|
2019-04-13 11:15:28 +00:00
|
|
|
set_source_files_properties(port/coap_debug.c PROPERTIES COMPILE_FLAGS -Wno-format-truncation)
|
2019-05-10 02:53:08 +00: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)
|