From 08c8f6ee790795dbc509fc90e334c7b7c0e302d2 Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Fri, 3 Apr 2020 21:45:52 +0800 Subject: [PATCH] src/CMakeLists.txt: fix static build with openssl Signed-off-by: Jianhui Zhao --- src/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bd3e22b..fa34810 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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)