From: Guy Harris Date: Tue, 4 Feb 2020 22:42:22 +0000 (-0800) Subject: Fix checks for libcrypto. X-Git-Tag: tcpdump-4.99-bp~561 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/422a74df58301a13f20d09f2337c9efe6020508b Fix checks for libcrypto. 1) We don't need libcrypto to check for the header files, and if we say we do, we get a lot of noise from CMake about policy CMP0075. 2) We need libcrypto, with the full path specified, for library tests; just linking with -lcrypto might not find it, or might find another version (thanks, Apple!). --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 6550f41a..7fa6e900 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -704,9 +704,6 @@ if(WITH_CRYPTO) # # Check for some headers and functions. # - cmake_push_check_state() - set(CMAKE_REQUIRED_LIBRARIES crypto) - check_include_file(openssl/evp.h HAVE_OPENSSL_EVP_H) # @@ -715,6 +712,9 @@ if(WITH_CRYPTO) # EVP_CIPHER_CTX may be opaque; otherwise, we allocate # it ourselves. # + cmake_push_check_state() + set(CMAKE_REQUIRED_LIBRARIES "${CRYPTO_LIBRARIES}") + check_function_exists(EVP_CIPHER_CTX_new HAVE_EVP_CIPHER_CTX_NEW) #