mbedtls: align CMake build with corresponding component.mk

This commit is contained in:
Mahavir Jain
2018-11-08 11:26:33 +05:30
parent a3785792eb
commit 907b1a9032
3 changed files with 8 additions and 3 deletions
+6 -1
View File
@@ -21,6 +21,11 @@ include_directories("${COMPONENT_PATH}/port/include")
# Import mbedtls library targets
add_subdirectory(mbedtls)
# Use port specific implementation of net_socket.c instead of one from mbedtls
get_target_property(src_tls mbedtls SOURCES)
list(REMOVE_ITEM src_tls net_sockets.c)
set_property(TARGET mbedtls PROPERTY SOURCES ${src_tls})
set(mbedtls_targets mbedtls mbedcrypto mbedx509)
# Add port files to mbedtls targets
@@ -54,4 +59,4 @@ target_link_libraries(${COMPONENT_TARGET} ${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()
endif()