mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
tls: cmake: avoid using full host path for SSL lib
When using OE/Yocto to create a SDK/toolchain, the generated LibwebsocketsTargets.cmake falsely contains the host path (build artifacts) in INTERFACE_LINK_LIBRARIES instead of the actually installed SDK path. This host path originates from OPENSSL_LIBRARIES that gives the full path to the openssl library at build time. To avoid propagating full build host specific path to generated LibwebsocketsTargets.cmake, this patch forces to link with ssl and crypto instead of a full path.
This commit is contained in:
parent
e8eb7d6bd6
commit
507b4f5a62
1 changed files with 1 additions and 2 deletions
|
@ -267,8 +267,7 @@ 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_LIBRARIES})
|
||||
set(OPENSSL_LIBRARIES ${OPENSSL_LIBRARIES} PARENT_SCOPE)
|
||||
set(OPENSSL_LIBRARIES ${PC_OPENSSL_LIBRARIES})
|
||||
endif()
|
||||
set(OPENSSL_INCLUDE_DIRS "${OPENSSL_INCLUDE_DIR}")
|
||||
endif()
|
||||
|
|
Loading…
Add table
Reference in a new issue