Skip to content

Commit 309f596

Browse files
authored
Add shared librarly path before looking for TLS library (#566)
Fixes issues when built with a shared library Signed-off-by: Norbert Pocs <norbertp@openssl.org>
1 parent 3aedd7f commit 309f596

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,11 @@ ELSEIF ("${LSQUIC_LIBSSL}" STREQUAL "OPENSSL")
279279
ELSE()
280280

281281
SET(CMAKE_REQUIRED_INCLUDES "${SSLLIB_INCLUDE}")
282+
SET(CMAKE_REQUIRED_LIBRARIES "${LIBSSL_LIB_ssl};${LIBSSL_LIB_crypto}")
282283
if ("${STATIC_BUILD}" STREQUAL "yes")
283-
SET(CMAKE_REQUIRED_LIBRARIES "${LIBSSL_LIB_ssl};${LIBSSL_LIB_crypto}")
284284
LIST(APPEND CMAKE_REQUIRED_LIBRARIES "-pthread -lstdc++")
285285
ELSE()
286+
SET(CMAKE_REQUIRED_LINK_DIRECTORIES "${LIBSSL_DIR}")
286287
SET(CMAKE_EXE_LINKER_FLAGS "-Wl,-rpath=${LIBSSL_LIB} -L${LIBSSL_LIB} -lssl -lcrypto")
287288
ENDIF()
288289
check_symbol_exists(SSL_provide_quic_data openssl/ssl.h HAVE_SSL_PROVIDE_QUIC_DATA)

0 commit comments

Comments
 (0)