From bd83df18abba245a01ee07ac37668a5976c3b4a2 Mon Sep 17 00:00:00 2001 From: Prasanth R Date: Fri, 11 Mar 2022 10:17:43 +0530 Subject: [PATCH] libpcap: Avoid openssl full library path OPENSSL_LIBRARIES provide the entire path When I used the pcap-config to grep the LIBS in ppp build, it fails with below error, cannot find -l/path-to-/lib/libssl.so cannot find -l/path-to-/toolchain/lib/libcrypto.so --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b6474b16bf..4ad2cd26a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1030,8 +1030,9 @@ if(OPENSSL_FOUND) # # We have OpenSSL. # +set(OPENSSL_LIBS ssl crypto) include_directories(SYSTEM ${OPENSSL_INCLUDE_DIR}) - set(PCAP_LINK_LIBRARIES ${PCAP_LINK_LIBRARIES} ${OPENSSL_LIBRARIES}) + set(PCAP_LINK_LIBRARIES ${PCAP_LINK_LIBRARIES} ${OPENSSL_LIBS}) set(HAVE_OPENSSL YES) endif(OPENSSL_FOUND)