summaryrefslogtreecommitdiffstats
path: root/cmake/Modules/FindCRYPTO.cmake
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:13:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:13:01 +0000
commit7adcb5b605cc1328a3084c334f4697ec9771936c (patch)
tree03e681bfda053978ba896745828e09cb056ad156 /cmake/Modules/FindCRYPTO.cmake
parentInitial commit. (diff)
downloadtcpdump-upstream.tar.xz
tcpdump-upstream.zip
Adding upstream version 4.99.4.upstream/4.99.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cmake/Modules/FindCRYPTO.cmake')
-rw-r--r--cmake/Modules/FindCRYPTO.cmake24
1 files changed, 24 insertions, 0 deletions
diff --git a/cmake/Modules/FindCRYPTO.cmake b/cmake/Modules/FindCRYPTO.cmake
new file mode 100644
index 0000000..453c651
--- /dev/null
+++ b/cmake/Modules/FindCRYPTO.cmake
@@ -0,0 +1,24 @@
+#
+# 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
+)
+
+set(CRYPTO_INCLUDE_DIRS ${CRYPTO_INCLUDE_DIR})
+set(CRYPTO_LIBRARIES ${CRYPTO_LIBRARY})