mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-04 20:05:25 +02:00
mbedtls: component CMakeLists.txt corrections
Since !4452 the common component requirements automatically get privately linked to libraries built under ESP-IDF build system (this includes targets from third-party libraries). This removes a variable that was used for that purpose before !4452. Since the internal target names were changed, the compile definition for warning on using deprecated functions is not being passed. Since using the internal name is unreliable, prefer passing this compile definition from the test itself.
This commit is contained in:
@@ -2,8 +2,6 @@ set(COMPONENT_ADD_INCLUDEDIRS "port/include" "mbedtls/include")
|
||||
set(COMPONENT_SRCS "mbedtls.c")
|
||||
set(COMPONENT_REQUIRES lwip)
|
||||
|
||||
set(MBEDTLS_PRIV_REQUIRES ${IDF_COMPONENT_REQUIRES_COMMON} soc)
|
||||
|
||||
register_component()
|
||||
|
||||
# Only build mbedtls libraries
|
||||
@@ -96,9 +94,4 @@ foreach(target ${mbedtls_targets})
|
||||
endforeach()
|
||||
|
||||
# Link mbedtls libraries to component library
|
||||
target_link_libraries(${COMPONENT_LIB} ${mbedtls_targets})
|
||||
|
||||
# Catch usage of deprecated mbedTLS functions when building tests
|
||||
if(mbedtls_test IN_LIST BUILD_TEST_COMPONENTS)
|
||||
add_definitions(-DMBEDTLS_DEPRECATED_WARNING)
|
||||
endif()
|
||||
target_link_libraries(${COMPONENT_LIB} ${mbedtls_targets})
|
||||
Reference in New Issue
Block a user