mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
CMakeLists.txt: fix static build with openssl
openssl can depends on -latomic so use pkg-config (if available) to retrieve these static dependencies otherwise build will fail because HMAC_CTX_new test will return a wrong result Fixes: - http://autobuild.buildroot.org/results/65d0528b208c0a470264f7e2433be89425971dd7 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
This commit is contained in:
parent
08e008ac3d
commit
5f8134cfe5
1 changed files with 3 additions and 0 deletions
|
@ -1803,7 +1803,10 @@ if (LWS_WITH_SSL)
|
|||
if (NOT OPENSSL_FOUND AND NOT LWS_WITH_BORINGSSL)
|
||||
# TODO: Add support for STATIC also.
|
||||
if (NOT LWS_PLAT_FREERTOS)
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_OPENSSL openssl QUIET)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
list(APPEND OPENSSL_LIBRARIES ${PC_OPENSSL_LIBRARIES})
|
||||
endif()
|
||||
set(OPENSSL_INCLUDE_DIRS "${OPENSSL_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
|
Loading…
Add table
Reference in a new issue