Merge pull request #13 from ffontaine/master

src/CMakeLists.txt: fix static build with a zlib and mbedtls
This commit is contained in:
Jianhui Zhao authored and GitHub committed 2020-12-02 13:11:08 +08:00
commit 2c0cedc2bd
1 file changed
+6 -1
+6 -1
View File
@@ -57,6 +57,7 @@ else()
endif()
find_package(WolfSSL)
find_package(MbedTLS)
find_package(ZLIB)
if(UHTTPD_USE_OPENSSL)
if (NOT OPENSSL_FOUND)
@@ -97,7 +98,11 @@ else()
elseif(UHTTPD_USE_MBEDTLS)
set(SSL_NAME "MbedTLS(PolarSSL)")
set(SSL_INC ${MBEDTLS_INCLUDE_DIR})
set(SSL_LIB ${MBEDTLS_LIBRARIES})
if(ZLIB_FOUND)
set(SSL_LIB ${MBEDTLS_LIBRARIES} ${ZLIB_LIBRARIES})
else()
set(SSL_LIB ${MBEDTLS_LIBRARIES})
endif()
set(UHTTPD_HAVE_MBEDTLS_CONFIG 1)
endif()