libarchive: Restore explicit linking to openssl crypto library

This is present in the upstream libarchive CMake code.  We removed it
in commit 59d28b2849 (libarchive: Drop early use of crypto library,
2016-05-03, v3.6.0-rc1~100^2), but didn't record details for why.
Many other changes have been made since then, so the original problem
may no longer occur.  Restore the link dependency since it reflects
a real dependency of the implementation.
This commit is contained in:
Brad King
2025-02-08 13:22:15 -05:00
parent ec24f910d8
commit 2bfb9f7e8a

View File

@@ -887,6 +887,7 @@ IF(ENABLE_OPENSSL AND NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
IF(OPENSSL_FOUND)
SET(HAVE_LIBCRYPTO 1)
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
LIST(APPEND ADDITIONAL_LIBS ${OPENSSL_CRYPTO_LIBRARY})
SET(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY})
SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
LA_CHECK_INCLUDE_FILE("openssl/evp.h" HAVE_OPENSSL_EVP_H)