|
1 | 1 | idf_build_get_property(target IDF_TARGET)
|
2 |
| -set(CONFIG_LWIP_ALTCP_TLS 1) |
3 | 2 |
|
4 | 3 | if(CONFIG_LWIP_ENABLE)
|
| 4 | + set(CONFIG_LWIP_ALTCP_TLS 1) |
5 | 5 | if(NOT ${target} STREQUAL "linux")
|
6 | 6 | # ESP platform targets share the same port folder
|
7 | 7 | set(target esp32xx)
|
@@ -103,22 +103,6 @@ if(CONFIG_LWIP_ENABLE)
|
103 | 103 | "port/sockets_ext.c"
|
104 | 104 | "port/freertos/sys_arch.c")
|
105 | 105 |
|
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 |
| - |
122 | 106 | if(CONFIG_LWIP_NETIF_API)
|
123 | 107 | list(APPEND srcs "port/if_index.c")
|
124 | 108 | endif()
|
@@ -194,10 +178,25 @@ if(NOT ${target} STREQUAL "linux")
|
194 | 178 | set(priv_requires vfs)
|
195 | 179 | endif()
|
196 | 180 |
|
| 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 | + |
197 | 197 | idf_component_register(SRCS "${srcs}"
|
198 | 198 | INCLUDE_DIRS ${include_dirs}
|
199 | 199 | LDFRAGMENTS ${linker_fragments}
|
200 |
| - REQUIRES ${requires} |
201 | 200 | PRIV_REQUIRES ${priv_requires})
|
202 | 201 |
|
203 | 202 | if(CONFIG_LWIP_ENABLE)
|
|
0 commit comments