summaryrefslogtreecommitdiff
path: root/cmake/Modules/FindCRYPTO.cmake
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-01-22 17:20:02 -0800
committerGuy Harris <guy@alum.mit.edu>2018-01-22 17:20:02 -0800
commit54587515efd5e2584b0a343eb4e312dd56d70579 (patch)
tree31829991ec7af610e354cca8c73bd6ff62981b63 /cmake/Modules/FindCRYPTO.cmake
parent72b5093bfb8d5a4f6772d66568917f68adf3bc44 (diff)
downloadtcpdump-54587515efd5e2584b0a343eb4e312dd56d70579.tar.gz
Add libcrypto checks.
Put the optional libraries after libpcap, which is *not* optional.
Diffstat (limited to 'cmake/Modules/FindCRYPTO.cmake')
-rw-r--r--cmake/Modules/FindCRYPTO.cmake21
1 files changed, 21 insertions, 0 deletions
diff --git a/cmake/Modules/FindCRYPTO.cmake b/cmake/Modules/FindCRYPTO.cmake
new file mode 100644
index 00000000..c60389ec
--- /dev/null
+++ b/cmake/Modules/FindCRYPTO.cmake
@@ -0,0 +1,21 @@
+#
+# Try to find libcrypto.
+#
+
+# Try to find the header
+find_path(CRYPTO_INCLUDE_DIR openssl/crypto.h)
+
+# Try to find the library
+find_library(CRYPTO_LIBRARY crypto)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(CRYPTO
+ DEFAULT_MSG
+ CRYPTO_INCLUDE_DIR
+ CRYPTO_LIBRARY
+)
+
+mark_as_advanced(
+ CRYPTO_INCLUDE_DIR
+ CRYPTO_LIBRARY
+)