Skip to content

Commit

Permalink
openssl: only use pc libs if no find_package
Browse files Browse the repository at this point in the history
  • Loading branch information
lws-team committed Jan 15, 2024
1 parent 49bfef2 commit 638558a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/tls/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,9 @@ if (LWS_WITH_SSL)
find_package(PkgConfig QUIET)
pkg_check_modules(PC_OPENSSL openssl QUIET)
find_package(OpenSSL REQUIRED)
list(APPEND OPENSSL_LIBRARIES ${PC_OPENSSL_LINK_LIBRARIES})
if (NOT OPENSSL_FOUND AND PC_OPENSSL_FOUND)
list(APPEND OPENSSL_LIBRARIES ${PC_OPENSSL_LINK_LIBRARIES})
endif()
set(OPENSSL_LIBRARIES ${OPENSSL_LIBRARIES} PARENT_SCOPE)
endif()
set(OPENSSL_INCLUDE_DIRS "${OPENSSL_INCLUDE_DIR}")
Expand Down

0 comments on commit 638558a

Please sign in to comment.