]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Fix checks for libcrypto.
authorGuy Harris <[email protected]>
Tue, 4 Feb 2020 22:42:22 +0000 (14:42 -0800)
committerGuy Harris <[email protected]>
Tue, 4 Feb 2020 22:42:22 +0000 (14:42 -0800)
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!).

CMakeLists.txt

index 6550f41a264acbf65efc0b8621ee3ab16f456e55..7fa6e900ec8f55d6e20c95f1af9724fb59cb013f 100644 (file)
@@ -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)
 
         #