From c226da3e108176b00b151b4154e187aa4db9e52f Mon Sep 17 00:00:00 2001 From: Orefkov Aleksander Date: Tue, 12 Oct 2021 10:13:18 +0300 Subject: [PATCH] cmake: wrong miniz include dir + mbed link on windows --- CMakeLists.txt | 2 +- lib/tls/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e428af8f..c062be6f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -865,7 +865,7 @@ if (LWS_WITH_ZLIB) if (NOT ZLIB_FOUND) if (LWS_WITH_MINIZ) find_package(Miniz REQUIRED) - set(ZLIB_INCLUDE_DIRS ${MINIZ_INCLUDE_DIRS}) + set(ZLIB_INCLUDE_DIRS ${MINIZ_INCLUDE_DIR}) set(ZLIB_LIBRARIES ${MINIZ_LIBRARIES}) else() find_package(ZLIB REQUIRED) diff --git a/lib/tls/CMakeLists.txt b/lib/tls/CMakeLists.txt index fdf9cb1d4..91ca8be93 100644 --- a/lib/tls/CMakeLists.txt +++ b/lib/tls/CMakeLists.txt @@ -367,6 +367,7 @@ if (LWS_WITH_MBEDTLS) # not supported in esp-idf openssl wrapper yet, but is in our version set(LWS_HAVE_X509_VERIFY_PARAM_set1_host 1 PARENT_SCOPE) endif() + set(CMAKE_REQUIRED_LIBRARIES ${MBEDTLS_LIBRARY} ${MBEDX509_LIBRARY} ${MBEDCRYPTO_LIBRARY}) set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${MBEDTLS_INCLUDE_DIRS}) CHECK_C_SOURCE_COMPILES("#include \nint main(void) { struct mbedtls_x509_crt c; c.authority_key_id.keyIdentifier.tag = MBEDTLS_ASN1_OCTET_STRING; return c.authority_key_id.keyIdentifier.tag; }\n" LWS_HAVE_MBEDTLS_AUTH_KEY_ID)