From b88b65f6d44176464a5ec4e7ea9ba96c0031901f Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Fri, 27 Apr 2018 16:40:39 +0200 Subject: [PATCH] Work on CMake build system - prevent building MBEDTLS applications and minor cleanups --- ports/CMakeCommon.cmake | 5 ++--- ports/win32/CMakeLists.txt | 7 ++++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/CMakeCommon.cmake b/ports/CMakeCommon.cmake index 80a18d4..9fa2050 100644 --- a/ports/CMakeCommon.cmake +++ b/ports/CMakeCommon.cmake @@ -19,11 +19,10 @@ endif() # ARM mbedtls support https://tls.mbed.org/ set(MBEDTLSDIR ${LWIP_CONTRIB_DIR}/../mbedtls) if(EXISTS ${MBEDTLSDIR}/include/mbedtls/ssl.h) - add_subdirectory(${LWIP_CONTRIB_DIR}/../mbedtls mbedtls) + set(ENABLE_PROGRAMS OFF CACHE BOOL "Prevent building MBEDTLS programs") + add_subdirectory(${LWIP_CONTRIB_DIR}/../mbedtls mbedtls) add_definitions(-DLWIP_HAVE_MBEDTLS=1) - include_directories(${MBEDTLSDIR}/include) - link_libraries(mbedtls mbedcrypto mbedx509) endif() diff --git a/ports/win32/CMakeLists.txt b/ports/win32/CMakeLists.txt index 4b7a76a..dbb9fa9 100644 --- a/ports/win32/CMakeLists.txt +++ b/ports/win32/CMakeLists.txt @@ -6,9 +6,10 @@ set(lwipcontribportwindows_SRCS ) # pcapif needs WinPcap developer package: https://www.winpcap.org/devel.htm -find_library(WPCAP wpcap HINTS ${LWIP_CONTRIB_DIR}/../WpdPack/lib) -find_library(PACKET packet HINTS ${LWIP_CONTRIB_DIR}/../WpdPack/lib) -include_directories("${LWIP_CONTRIB_DIR}/../WpdPack/include") +set(WPDPACK_DIR ${LWIP_CONTRIB_DIR}/../WpdPack) +find_library(WPCAP wpcap HINTS ${WPDPACK_DIR}/lib) +find_library(PACKET packet HINTS ${WPDPACK_DIR}/lib) +include_directories("${WPDPACK_DIR}/include") link_libraries(${WPCAP} ${PACKET}) add_library(lwipcontribportwindows EXCLUDE_FROM_ALL ${lwipcontribportwindows_SRCS})