Browse Source

Work on CMake build system

Try to make mbedtls checks platform-independent
It seems disabling compile flags is not needed any more
master
Dirk Ziegelmeier 8 years ago
parent
commit
534e4e1be3
  1. 21
      ports/CMakeCommon.cmake

21
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()

Loading…
Cancel
Save