Skip to content

Commit

Permalink
asio coap: If LWIP IPV6 is disabled, automatically don't build asio &…
Browse files Browse the repository at this point in the history
… coap

- Removes need to manually exclude these components as shown at
  espressif/esp-idf#3781 (comment)

- Hide the config for these components if IPV6 is disabled

- The components are still included in the build, but with no source
  files


* Original commit: espressif/esp-idf@e305f29
  • Loading branch information
projectgus authored and suren-gabrielyan-espressif committed Jun 22, 2022
1 parent 47d57a5 commit cc0f2b3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions components/asio/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
if(NOT CONFIG_LWIP_IPV6 AND NOT CMAKE_BUILD_EARLY_EXPANSION)
# 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.
message(STATUS "IPV6 support is disabled so the asio component will not be built")
idf_component_register()
return()
endif()

set(asio_sources "asio/asio/src/asio.cpp")

if(CONFIG_ASIO_SSL_SUPPORT)
Expand Down
2 changes: 2 additions & 0 deletions components/asio/Kconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
menu "ESP-ASIO"
visible if LWIP_IPV6

config ASIO_SSL_SUPPORT
bool "Enable SSL/TLS support of ASIO"
default n
Expand Down
4 changes: 4 additions & 0 deletions components/asio/component.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ifdef CONFIG_LWIP_IPV6

COMPONENT_ADD_INCLUDEDIRS := asio/asio/include port/include
COMPONENT_PRIV_INCLUDEDIRS := private_include
COMPONENT_SRCDIRS := asio/asio/src port/src
Expand All @@ -7,3 +9,5 @@ COMPONENT_OBJEXCLUDE := asio/asio/src/asio_ssl.o port/src/esp_asio_openssl_stubs
endif

COMPONENT_SUBMODULES += asio

endif # CONFIG_LWIP_IPV6

0 comments on commit cc0f2b3

Please sign in to comment.