summaryrefslogtreecommitdiffstats
path: root/lib/libpcap/libpcap/cmake/Modules/FindDAG.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpcap/libpcap/cmake/Modules/FindDAG.cmake')
-rw-r--r--lib/libpcap/libpcap/cmake/Modules/FindDAG.cmake32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/libpcap/libpcap/cmake/Modules/FindDAG.cmake b/lib/libpcap/libpcap/cmake/Modules/FindDAG.cmake
new file mode 100644
index 0000000..ef13528
--- /dev/null
+++ b/lib/libpcap/libpcap/cmake/Modules/FindDAG.cmake
@@ -0,0 +1,32 @@
+#
+# Try to find the Endace DAG library.
+#
+
+# Try to find the header
+find_path(DAG_INCLUDE_DIR dagapi.h)
+
+#
+# Try to find the libraries
+#
+# We assume that if we have libdag we have libdagconf, as they're
+# installed at the same time from the same package.
+#
+find_library(DAG_LIBRARY dag)
+find_library(DAGCONF_LIBRARY dagconf)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(DAG
+ DEFAULT_MSG
+ DAG_INCLUDE_DIR
+ DAG_LIBRARY
+ DAGCONF_LIBRARY
+)
+
+mark_as_advanced(
+ DAG_INCLUDE_DIR
+ DAG_LIBRARY
+ DAGCONF_LIBRARY
+)
+
+set(DAG_INCLUDE_DIRS ${DAG_INCLUDE_DIR})
+set(DAG_LIBRARIES ${DAG_LIBRARY} ${DAGCONF_LIBRARY})