430b737760
components/coap/port/coap_mbedtls.c: Add in additional compile time check wrappers for different MbedTLS configurations. components/coap/CMakeLists.txt: components/coap/component.mk: components/coap/port/coap_notls.c: components/coap/port/include/coap_config_posix.h: Add in the ability to compile and run if MbedTLS does not have any TLS mode enabled. examples/protocols/coap_client/main/coap_client_example_main.c: Inform user that MbedTLS Client Mode is required for DTLS if not enabled, and coaps:// has been requested. [Lower libcoap library will still error and report this condition] examples/protocols/coap_server/main/coap_server_example_main.c: Inform user that MbedTLS Server Mode is required for DTLS if not enabled. [Lower libcoap library will still error and report this condition] Closes https://github.com/espressif/esp-idf/issues/3961 Closes https://github.com/espressif/esp-idf/issues/3971 Closes https://github.com/espressif/esp-idf/pull/3977
36 lines
1.1 KiB
CMake
36 lines
1.1 KiB
CMake
set(include_dirs port/include port/include/coap libcoap/include libcoap/include/coap2)
|
|
|
|
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"
|
|
"port/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_io.c"
|
|
"port/coap_notls.c"
|
|
"port/coap_mbedtls.c")
|
|
|
|
idf_component_register(SRCS "${srcs}"
|
|
INCLUDE_DIRS "${include_dirs}"
|
|
REQUIRES lwip mbedtls)
|
|
|
|
# Silence format truncation warning, until it is fixed upstream
|
|
set_source_files_properties(port/coap_debug.c PROPERTIES COMPILE_FLAGS -Wno-format-truncation)
|
|
|
|
# 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)
|
|
|