Fix building uiqt on Windows with the cmake build system:
authorJoerg Mayer <jmayer@loplof.de>
Wed, 18 Jun 2014 06:51:15 +0000 (08:51 +0200)
committerJörg Mayer <jmayer@loplof.de>
Wed, 18 Jun 2014 06:54:52 +0000 (06:54 +0000)
Protecting HAVE_PCAP_CREATE was not enough for the moc run in qt,
maybe it doesn't have _WIN32 set?  Don't even try to detect this
function on WIN32 for now.

Change-Id: I0d8a8b5b110cec164f86fe11f26a7add558eee1b
Reviewed-on: https://code.wireshark.org/review/2370
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
cmake/modules/FindPCAP.cmake
cmakeconfig.h.in

index d468a26bf1d9eadd27665b2e3b4a8172cc898653..e5a0264e2bb70183e02435122fd933da098b5fa8 100644 (file)
@@ -55,7 +55,11 @@ check_function_exists( "pcap_freecode" HAVE_PCAP_FREECODE )
 # update libpcap without updating the headers.
 #
 check_function_exists( "pcap_breakloop" HAVE_PCAP_BREAKLOOP )
-check_function_exists( "pcap_create" HAVE_PCAP_CREATE )
+/* FIXME: The code (at least) in dumpcap assumes that PCAP_CREATE is not
+ *        available on Windows */
+if( NOT WIN32 )
+  check_function_exists( "pcap_create" HAVE_PCAP_CREATE )
+endif()
 check_function_exists( "pcap_datalink_name_to_val" HAVE_PCAP_DATALINK_NAME_TO_VAL )
 check_function_exists( "pcap_datalink_val_to_description" HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION )
 check_function_exists( "pcap_datalink_val_to_name" HAVE_PCAP_DATALINK_VAL_TO_NAME )
index 41321b94db6847e63b231a12f1d54facc91340ff..6454b2dffaca2b4cce185586e5e483f1ecc3bd81 100644 (file)
 /* Define if pcap_breakloop is known */
 #cmakedefine HAVE_PCAP_BREAKLOOP 1
 
-/* FIXME: The code (at least) in dumpcap assumes that PCAP_CREATE is not
- *        available on Windows - but we detect it in winpcap */
-#ifndef _WIN32
 /* Define to 1 if you have the `pcap_create' function. */
 #cmakedefine HAVE_PCAP_CREATE 1
-#endif
 
 /* Define to 1 if you have the `pcap_datalink_name_to_val' function. */
 #cmakedefine HAVE_PCAP_DATALINK_NAME_TO_VAL 1