2018-01-12 02:49:13 +00:00
|
|
|
set(COMPONENT_ADD_INCLUDEDIRS port/include port/include/coap libcoap/include libcoap/include/coap)
|
|
|
|
|
2018-09-13 00:56:59 +00:00
|
|
|
set(COMPONENT_SRCS "libcoap/src/address.c"
|
|
|
|
"libcoap/src/async.c"
|
|
|
|
"libcoap/src/block.c"
|
|
|
|
"libcoap/src/coap_time.c"
|
|
|
|
"libcoap/src/debug.c"
|
|
|
|
"libcoap/src/encode.c"
|
|
|
|
"libcoap/src/hashkey.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"
|
|
|
|
"port/coap_io_socket.c")
|
2018-01-12 02:49:13 +00:00
|
|
|
|
2018-03-22 06:27:10 +00:00
|
|
|
set(COMPONENT_REQUIRES lwip)
|
|
|
|
|
2018-01-12 02:49:13 +00:00
|
|
|
register_component()
|
|
|
|
|
|
|
|
# Needed for coap headers in public builds, also.
|
|
|
|
#
|
|
|
|
# TODO: find a way to move this to a port header
|
2018-11-11 07:36:10 +00:00
|
|
|
target_compile_definitions(${COMPONENT_TARGET} PUBLIC WITH_POSIX)
|
2018-01-12 02:49:13 +00:00
|
|
|
|
2018-08-16 05:01:43 +00:00
|
|
|
set_source_files_properties(
|
|
|
|
libcoap/src/debug.c
|
|
|
|
libcoap/src/pdu.c
|
|
|
|
PROPERTIES COMPILE_FLAGS
|
|
|
|
-Wno-write-strings)
|
|
|
|
|
2018-09-18 03:44:24 +00:00
|
|
|
if(GCC_NOT_5_2_0)
|
|
|
|
# Temporary suppress "fallthrough" warnings until they are fixed in libcoap repo
|
|
|
|
set_source_files_properties(
|
|
|
|
libcoap/src/option.c
|
|
|
|
PROPERTIES COMPILE_FLAGS
|
|
|
|
-Wno-implicit-fallthrough)
|
|
|
|
endif()
|