CMake: Remove wsutil pcap dependency
Change-Id: Ic5a3653cb8bcc33e0be108c8b201567e7090f9f5 Reviewed-on: https://code.wireshark.org/review/33043 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: João Valverde <j@v6e.pt>
This commit is contained in:
parent
4c5d2f5ccf
commit
c7d86568a0
|
@ -26,7 +26,11 @@ add_library(capchild STATIC
|
|||
${CAPCHILD_SRC}
|
||||
)
|
||||
|
||||
target_link_libraries(capchild PRIVATE wsutil)
|
||||
target_link_libraries(capchild
|
||||
PRIVATE
|
||||
wsutil
|
||||
$<$<BOOL:${PCAP_FOUND}>:pcap::pcap>
|
||||
)
|
||||
|
||||
set_target_properties(capchild PROPERTIES
|
||||
LINK_FLAGS "${WS_LINK_FLAGS}"
|
||||
|
|
|
@ -50,6 +50,7 @@ add_library(caputils STATIC
|
|||
target_link_libraries(caputils
|
||||
PUBLIC
|
||||
wsutil
|
||||
$<$<BOOL:${PCAP_FOUND}>:pcap::pcap>
|
||||
PRIVATE
|
||||
${NL_LIBRARIES}
|
||||
)
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#ifdef HAVE_LIBPCAP
|
||||
|
||||
#include <wsutil/wspcap.h>
|
||||
#include "wspcap.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <dlfcn.h>
|
||||
|
|
|
@ -17,7 +17,7 @@ extern "C" {
|
|||
|
||||
#ifdef HAVE_LIBPCAP
|
||||
|
||||
#include <wsutil/wspcap.h>
|
||||
#include "wspcap.h"
|
||||
|
||||
#include "capture_opts.h"
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
|
||||
#include <wsutil/wspcap.h>
|
||||
#include "wspcap.h"
|
||||
|
||||
/* XXX - yes, I know, I should move cppmagic.h to a generic location. */
|
||||
#include "tools/lemon/cppmagic.h"
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
#define PCAP_RECORD_HEADER_LENGTH 16
|
||||
|
||||
#ifdef ANDROIDDUMP_USE_LIBPCAP
|
||||
#include <wsutil/wspcap.h>
|
||||
#include "wspcap.h"
|
||||
#include <pcap-bpf.h>
|
||||
#include <pcap/bluetooth.h>
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include <time.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <wsutil/wspcap.h>
|
||||
#include "wspcap.h"
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
|
|
|
@ -530,14 +530,14 @@ sub check_included_files($$)
|
|||
}
|
||||
}
|
||||
|
||||
# only our wrapper file wsutils/wspcap.h may include pcap.h
|
||||
# only our wrapper file wspcap.h may include pcap.h
|
||||
# all other files should include the wrapper
|
||||
if ($filename !~ /wspcap\.h/) {
|
||||
foreach (@incFiles) {
|
||||
if ( m#([<"]|/+)pcap\.h[>"]$# ) {
|
||||
print STDERR "Warning: ".$filename.
|
||||
" includes pcap.h directly. ".
|
||||
"Include wsutil/wspcap.h instead.\n";
|
||||
"Include wspcap.h instead.\n";
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include <errno.h>
|
||||
#include <getopt.h>
|
||||
|
||||
#include <wsutil/wspcap.h>
|
||||
#include "wspcap.h"
|
||||
|
||||
static int dumping;
|
||||
static volatile int keep_going;
|
||||
|
|
|
@ -86,7 +86,7 @@ set_target_properties(ui PROPERTIES
|
|||
FOLDER "UI"
|
||||
)
|
||||
|
||||
target_link_libraries(ui wsutil)
|
||||
target_link_libraries(ui wsutil caputils)
|
||||
|
||||
if (HTML_HELP_COMPILER)
|
||||
add_definitions(-DHHC_DIR)
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#ifdef HAVE_LIBPCAP
|
||||
#include <glib.h>
|
||||
|
||||
#include <wsutil/wspcap.h>
|
||||
#include "wspcap.h"
|
||||
|
||||
#include "capture_opts.h"
|
||||
#include "ui/capture_globals.h"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "compiled_filter_output.h"
|
||||
|
||||
#ifdef HAVE_LIBPCAP
|
||||
#include <wsutil/wspcap.h>
|
||||
#include "wspcap.h"
|
||||
#endif
|
||||
|
||||
#include "capture_opts.h"
|
||||
|
|
|
@ -270,7 +270,6 @@ target_link_libraries(wsutil
|
|||
${GCRYPT_LIBRARIES}
|
||||
${WIN_WS2_32_LIBRARY}
|
||||
${GNUTLS_LIBRARIES}
|
||||
$<$<BOOL:${PCAP_FOUND}>:pcap::pcap>
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
|
|
Loading…
Reference in New Issue