Skip to content

Commit b34e3ab

Browse files
committed
Try solving requires mbedtls
1 parent 58a54b2 commit b34e3ab

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

components/lwip/CMakeLists.txt

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
idf_build_get_property(target IDF_TARGET)
2-
set(CONFIG_LWIP_ALTCP_TLS 1)
32

43
if(CONFIG_LWIP_ENABLE)
4+
set(CONFIG_LWIP_ALTCP_TLS 1)
55
if(NOT ${target} STREQUAL "linux")
66
# ESP platform targets share the same port folder
77
set(target esp32xx)
@@ -103,22 +103,6 @@ if(CONFIG_LWIP_ENABLE)
103103
"port/sockets_ext.c"
104104
"port/freertos/sys_arch.c")
105105

106-
if (${CONFIG_LWIP_ALTCP_TLS})
107-
108-
list(APPEND srcs
109-
"lwip/src/core/altcp_alloc.c"
110-
"lwip/src/core/altcp_tcp.c"
111-
"lwip/src/core/altcp.c"
112-
"lwip/src/apps/altcp_tls/altcp_tls_mbedtls_mem.c"
113-
"lwip/src/apps/altcp_tls/altcp_tls_mbedtls.c")
114-
115-
list(APPEND include_dirs lwip/src/apps/altcp_tls)
116-
# add_compile_definitions(LWIP_ALTCP=1)
117-
# add_compile_definitions(LWIP_ALTCP_TLS=1)
118-
119-
set(requires mbedtls)
120-
endif()
121-
122106
if(CONFIG_LWIP_NETIF_API)
123107
list(APPEND srcs "port/if_index.c")
124108
endif()
@@ -194,10 +178,25 @@ if(NOT ${target} STREQUAL "linux")
194178
set(priv_requires vfs)
195179
endif()
196180

181+
if (${CONFIG_LWIP_ALTCP_TLS})
182+
list(APPEND srcs
183+
"lwip/src/core/altcp_alloc.c"
184+
"lwip/src/core/altcp_tcp.c"
185+
"lwip/src/core/altcp.c"
186+
"lwip/src/apps/altcp_tls/altcp_tls_mbedtls_mem.c"
187+
"lwip/src/apps/altcp_tls/altcp_tls_mbedtls.c")
188+
189+
list(APPEND include_dirs lwip/src/apps/altcp_tls)
190+
# add_compile_definitions(LWIP_ALTCP=1)
191+
# add_compile_definitions(LWIP_ALTCP_TLS=1)
192+
193+
list(APPEND priv_requires mbedtls)
194+
endif()
195+
196+
197197
idf_component_register(SRCS "${srcs}"
198198
INCLUDE_DIRS ${include_dirs}
199199
LDFRAGMENTS ${linker_fragments}
200-
REQUIRES ${requires}
201200
PRIV_REQUIRES ${priv_requires})
202201

203202
if(CONFIG_LWIP_ENABLE)

0 commit comments

Comments
 (0)