Merge 'mbedtls-1.3-fix-cmake-lib-target'

Add a lib target to library/CMakeLists.txt to improve compatibility between
mbed TLS 1.3 and more recent versions of the library.
This commit is contained in:
Simon Butcher 2017-02-03 17:18:33 +00:00
commit d9bac1f4f9

View file

@ -136,10 +136,18 @@ endif(USE_SHARED_MBEDTLS_LIBRARY)
if(UNIX)
add_custom_target(polarssl
DEPENDS mbedtls # TODO: and mbedtls_static is shared is defined
DEPENDS mbedtls
COMMAND ${CMAKE_SOURCE_DIR}/scripts/polarssl_symlinks.sh ${CMAKE_BINARY_DIR}/library
)
add_custom_target(lib
DEPENDS polarssl
)
set_directory_properties(PROPERTIES
ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_BINARY_DIR}/library/libpolarssl.a"
)
if(USE_STATIC_MBEDTLS_LIBRARY AND USE_SHARED_MBEDTLS_LIBRARY)
add_dependencies(polarssl mbedtls_static)
endif()