src/CMakeLists.txt: fix static build with openssl

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
main
Jianhui Zhao 2020-04-03 21:45:52 +08:00
parent 350e520dfe
commit 08c8f6ee79
1 changed files with 5 additions and 1 deletions

View File

@ -29,7 +29,11 @@ set(UHTTPD_HAVE_MBEDTLS_CONFIG 0)
if(NOT UHTTPD_SSL_SUPPORT)
set(UHTTPD_SSL_SUPPORT_CONFIG 0)
else()
find_package(OpenSSL)
find_package(PkgConfig QUIET)
pkg_check_modules(OPENSSL QUIET openssl)
if (NOT OPENSSL_FOUND)
find_package(OpenSSL)
endif()
find_package(WolfSSL)
find_package(MbedTLS)