aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2013-10-10 20:35:32 +0000
committerJörg Mayer <jmayer@loplof.de>2013-10-10 20:35:32 +0000
commit2a59ee58b8b6d42f5119d67f957b3dc76972b27d (patch)
tree1c861fe1a0ba11c6ae51c123f7f85c0d067e3647 /cmake
parent561a0713d1fc3f32f9195115f467222bf53e2ea5 (diff)
Add Airpcap detection, use it by default on win32
QT5 compile working - NOT. It's almost working, except that I *still* need to get GTK detection working on Win :-( svn path=/trunk/; revision=52513
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/FindAIRPCAP.cmake41
1 files changed, 41 insertions, 0 deletions
diff --git a/cmake/modules/FindAIRPCAP.cmake b/cmake/modules/FindAIRPCAP.cmake
new file mode 100644
index 0000000000..cc157783a8
--- /dev/null
+++ b/cmake/modules/FindAIRPCAP.cmake
@@ -0,0 +1,41 @@
+#
+# $Id$
+#
+# - Find airpcap
+# Find the native AIRPCAP includes and library
+#
+# AIRPCAP_INCLUDE_DIRS - where to find pcap.h, etc.
+# AIRPCAP_LIBRARIES - List of libraries when using pcap.
+# AIRPCAP_FOUND - True if pcap found.
+
+include( FindWSWinLibs )
+FindWSWinLibs( "AirPcap.*/Airpcap.*" "AIRPCAP_HINTS" )
+
+find_path( AIRPCAP_INCLUDE_DIR
+ NAMES
+ airpcap.h
+ pcap.h
+ HINTS
+ "${AIRPCAP_HINTS}/include"
+)
+
+find_library( AIRPCAP_LIBRARY
+ NAMES
+ airpcap
+ HINTS
+ "${AIRPCAP_HINTS}/lib"
+)
+
+
+include( FindPackageHandleStandardArgs )
+find_package_handle_standard_args( AIRPCAP DEFAULT_MSG AIRPCAP_INCLUDE_DIR AIRPCAP_LIBRARY )
+
+if( AIRPCAP_FOUND )
+ set( AIRPCAP_INCLUDE_DIRS ${AIRPCAP_INCLUDE_DIR} )
+ set( AIRPCAP_LIBRARIES ${AIRPCAP_LIBRARY} )
+else()
+ set( AIRPCAP_INCLUDE_DIRS )
+ set( AIRPCAP_LIBRARIES )
+endif()
+
+mark_as_advanced( AIRPCAP_LIBRARIES AIRPCAP_INCLUDE_DIRS )