2022-02-14 06:52:23 +01:00
|
|
|
if(NOT CONFIG_LWIP_IPV6 AND NOT CMAKE_BUILD_EARLY_EXPANSION)
|
|
|
|
message(STATUS "IPV6 support is disabled so the coap component will not be built")
|
|
|
|
# note: the component is still included in the build so it can become visible again in config
|
|
|
|
# without needing to re-run CMake. However no source or header files are built.
|
|
|
|
idf_component_register()
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(include_dirs port/include port/include libcoap/include)
|
|
|
|
|
|
|
|
set(srcs
|
|
|
|
"libcoap/src/block.c"
|
2022-07-27 13:17:41 +02:00
|
|
|
"libcoap/src/coap_address.c"
|
2022-02-14 06:52:23 +01:00
|
|
|
"libcoap/src/coap_asn1.c"
|
2022-07-27 13:17:41 +02:00
|
|
|
"libcoap/src/coap_async.c"
|
2022-02-14 06:52:23 +01:00
|
|
|
"libcoap/src/coap_cache.c"
|
|
|
|
"libcoap/src/coap_debug.c"
|
|
|
|
"libcoap/src/coap_event.c"
|
|
|
|
"libcoap/src/coap_hashkey.c"
|
|
|
|
"libcoap/src/coap_io.c"
|
|
|
|
"libcoap/src/coap_notls.c"
|
2022-07-27 13:17:41 +02:00
|
|
|
"libcoap/src/coap_option.c"
|
2022-02-14 06:52:23 +01:00
|
|
|
"libcoap/src/coap_prng.c"
|
|
|
|
"libcoap/src/coap_session.c"
|
2022-07-27 13:17:41 +02:00
|
|
|
"libcoap/src/coap_subscribe.c"
|
2022-02-14 06:52:23 +01:00
|
|
|
"libcoap/src/coap_tcp.c"
|
|
|
|
"libcoap/src/coap_time.c"
|
|
|
|
"libcoap/src/encode.c"
|
|
|
|
"libcoap/src/mem.c"
|
|
|
|
"libcoap/src/net.c"
|
|
|
|
"libcoap/src/pdu.c"
|
|
|
|
"libcoap/src/resource.c"
|
|
|
|
"libcoap/src/str.c"
|
2022-02-16 03:06:48 +01:00
|
|
|
"libcoap/src/uri.c"
|
2022-07-27 13:17:41 +02:00
|
|
|
"libcoap/src/coap_mbedtls.c")
|
2022-02-14 06:52:23 +01:00
|
|
|
|
|
|
|
idf_component_register(SRCS "${srcs}"
|
|
|
|
INCLUDE_DIRS "${include_dirs}"
|
|
|
|
REQUIRES lwip mbedtls)
|
2022-07-29 10:17:21 +02:00
|
|
|
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")
|
2022-02-14 06:52:23 +01:00
|
|
|
|