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!).
#
# 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)
#
# 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)
#