summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/FindPCAP.cmake21
-rw-r--r--cmake/Modules/FindSMI.cmake21
2 files changed, 42 insertions, 0 deletions
diff --git a/cmake/Modules/FindPCAP.cmake b/cmake/Modules/FindPCAP.cmake
new file mode 100644
index 00000000..78c0d8ca
--- /dev/null
+++ b/cmake/Modules/FindPCAP.cmake
@@ -0,0 +1,21 @@
+#
+# Try to find libpcap.
+#
+
+# Try to find the header
+find_path(PCAP_INCLUDE_DIR pcap.h)
+
+# Try to find the library
+find_library(PCAP_LIBRARY pcap)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(PCAP
+ DEFAULT_MSG
+ PCAP_INCLUDE_DIR
+ PCAP_LIBRARY
+)
+
+mark_as_advanced(
+ PCAP_INCLUDE_DIR
+ PCAP_LIBRARY
+)
diff --git a/cmake/Modules/FindSMI.cmake b/cmake/Modules/FindSMI.cmake
new file mode 100644
index 00000000..187d2c72
--- /dev/null
+++ b/cmake/Modules/FindSMI.cmake
@@ -0,0 +1,21 @@
+#
+# Try to find libsmi.
+#
+
+# Try to find the header
+find_path(SMI_INCLUDE_DIR smi.h)
+
+# Try to find the library
+find_library(SMI_LIBRARY smi)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(SMI
+ DEFAULT_MSG
+ SMI_INCLUDE_DIR
+ SMI_LIBRARY
+)
+
+mark_as_advanced(
+ SMI_INCLUDE_DIR
+ SMI_LIBRARY
+)