mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
fix(esp-tls): Fixed linux build for Build System v2
For Build System v2 on linux target, lwip dependency and ESP_TLS_WITH_LWIP definition must be conditional on CONFIG_LWIP_ENABLE rather than checking BUILD_COMPONENTS. v2 uses configuration-driven dependencies.
This commit is contained in:
committed by
Frantisek Hrbata
parent
5c141ea8c1
commit
f91c08b183
@@ -12,6 +12,11 @@ endif()
|
|||||||
set(priv_req http_parser esp_timer)
|
set(priv_req http_parser esp_timer)
|
||||||
if(NOT ${IDF_TARGET} STREQUAL "linux")
|
if(NOT ${IDF_TARGET} STREQUAL "linux")
|
||||||
list(APPEND priv_req lwip)
|
list(APPEND priv_req lwip)
|
||||||
|
else()
|
||||||
|
# For linux target on Build system v2, add lwip to PRIV_REQUIRES when CONFIG_LWIP_ENABLE is set.
|
||||||
|
if(CONFIG_LWIP_ENABLE AND IDF_BUILD_V2)
|
||||||
|
list(APPEND priv_req lwip)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
idf_component_register(SRCS "${srcs}"
|
idf_component_register(SRCS "${srcs}"
|
||||||
@@ -27,8 +32,7 @@ if(NOT ${IDF_TARGET} STREQUAL "linux")
|
|||||||
idf_component_get_property(lwip lwip COMPONENT_LIB)
|
idf_component_get_property(lwip lwip COMPONENT_LIB)
|
||||||
set_property(TARGET ${lwip} APPEND PROPERTY LINK_INTERFACE_MULTIPLICITY 5)
|
set_property(TARGET ${lwip} APPEND PROPERTY LINK_INTERFACE_MULTIPLICITY 5)
|
||||||
else()
|
else()
|
||||||
# Check if LWIP in the build for linux target to adapt esp-tls compatibility layer
|
# For linux target, define ESP_TLS_WITH_LWIP if LWIP is enabled in the build
|
||||||
idf_build_get_property(build_components BUILD_COMPONENTS)
|
|
||||||
if(CONFIG_LWIP_ENABLE)
|
if(CONFIG_LWIP_ENABLE)
|
||||||
target_compile_definitions(${COMPONENT_LIB} PRIVATE ESP_TLS_WITH_LWIP=1)
|
target_compile_definitions(${COMPONENT_LIB} PRIVATE ESP_TLS_WITH_LWIP=1)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user