From 534e4e1be3ae4b8b54bdb05d7e3ca34126347762 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Thu, 26 Apr 2018 23:37:28 +0200 Subject: [PATCH] Work on CMake build system Try to make mbedtls checks platform-independent It seems disabling compile flags is not needed any more --- ports/CMakeCommon.cmake | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/ports/CMakeCommon.cmake b/ports/CMakeCommon.cmake index 7cf9d62..bab994b 100644 --- a/ports/CMakeCommon.cmake +++ b/ports/CMakeCommon.cmake @@ -17,17 +17,12 @@ if(CMAKE_C_COMPILER_ID STREQUAL MSVC) endif() # ARM mbedtls support https://tls.mbed.org/ -if((CMAKE_C_COMPILER_ID STREQUAL Clang) OR (CMAKE_C_COMPILER_ID STREQUAL GNU)) - set(MBEDTLSDIR ${LWIP_CONTRIB_DIR}/../mbedtls) - if(EXISTS ${MBEDTLSDIR}/include/mbedtls/ssl.h) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-redundant-decls -DLWIP_HAVE_MBEDTLS=1") - - if(CMAKE_C_COMPILER_ID STREQUAL GNU) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-c90-c99-compat") - endif() - - include_directories(${MBEDTLSDIR}/include) - link_directories(${MBEDTLSDIR}/library) - link_libraries(mbedtls mbedcrypto mbedx509) - endif() +set(MBEDTLSDIR ${LWIP_CONTRIB_DIR}/../mbedtls) +if(EXISTS ${MBEDTLSDIR}/include/mbedtls/ssl.h) + add_definitions(-DLWIP_HAVE_MBEDTLS=1) + + include_directories(${MBEDTLSDIR}/include) + + link_directories(${MBEDTLSDIR}/library) + link_libraries(mbedtls mbedcrypto mbedx509) endif()