diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2019-05-01 19:02:34 +0100 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2019-05-03 21:57:05 +0000 |
commit | c7d86568a07845d56508baa88ece7853ce193eae (patch) | |
tree | 479090a83edd0b8e98980e6195e4350a702efe0f | |
parent | 4c5d2f5ccf822c07746853b065322c34dc322e8a (diff) |
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>
-rw-r--r-- | capchild/CMakeLists.txt | 6 | ||||
-rw-r--r-- | caputils/CMakeLists.txt | 1 | ||||
-rw-r--r-- | caputils/capture-pcap-util-unix.c | 2 | ||||
-rw-r--r-- | caputils/capture-pcap-util.h | 2 | ||||
-rw-r--r-- | caputils/capture_wpcap_packet.c | 2 | ||||
-rw-r--r-- | extcap/androiddump.c | 2 | ||||
-rw-r--r-- | ringbuffer.c | 2 | ||||
-rwxr-xr-x | tools/checkAPIs.pl | 4 | ||||
-rw-r--r-- | trigcap.c | 2 | ||||
-rw-r--r-- | ui/CMakeLists.txt | 2 | ||||
-rw-r--r-- | ui/qt/capture_filter_syntax_worker.cpp | 2 | ||||
-rw-r--r-- | ui/qt/compiled_filter_output.cpp | 2 | ||||
-rw-r--r-- | wspcap.h (renamed from wsutil/wspcap.h) | 0 | ||||
-rw-r--r-- | wsutil/CMakeLists.txt | 1 |
14 files changed, 17 insertions, 13 deletions
diff --git a/capchild/CMakeLists.txt b/capchild/CMakeLists.txt index cfea58eb99..688cdbcbc9 100644 --- a/capchild/CMakeLists.txt +++ b/capchild/CMakeLists.txt @@ -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}" diff --git a/caputils/CMakeLists.txt b/caputils/CMakeLists.txt index ee9a7302b7..e345146e27 100644 --- a/caputils/CMakeLists.txt +++ b/caputils/CMakeLists.txt @@ -50,6 +50,7 @@ add_library(caputils STATIC target_link_libraries(caputils PUBLIC wsutil + $<$<BOOL:${PCAP_FOUND}>:pcap::pcap> PRIVATE ${NL_LIBRARIES} ) diff --git a/caputils/capture-pcap-util-unix.c b/caputils/capture-pcap-util-unix.c index a5a847a08c..384a9851bf 100644 --- a/caputils/capture-pcap-util-unix.c +++ b/caputils/capture-pcap-util-unix.c @@ -16,7 +16,7 @@ #ifdef HAVE_LIBPCAP -#include <wsutil/wspcap.h> +#include "wspcap.h" #ifdef __APPLE__ #include <dlfcn.h> diff --git a/caputils/capture-pcap-util.h b/caputils/capture-pcap-util.h index e0e3fa78e9..85750cff4d 100644 --- a/caputils/capture-pcap-util.h +++ b/caputils/capture-pcap-util.h @@ -17,7 +17,7 @@ extern "C" { #ifdef HAVE_LIBPCAP -#include <wsutil/wspcap.h> +#include "wspcap.h" #include "capture_opts.h" diff --git a/caputils/capture_wpcap_packet.c b/caputils/capture_wpcap_packet.c index 754c2487fd..89cbf99643 100644 --- a/caputils/capture_wpcap_packet.c +++ b/caputils/capture_wpcap_packet.c @@ -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" diff --git a/extcap/androiddump.c b/extcap/androiddump.c index 8ca775d496..3f273a3411 100644 --- a/extcap/androiddump.c +++ b/extcap/androiddump.c @@ -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> diff --git a/ringbuffer.c b/ringbuffer.c index 08b9fbe311..2069f4de98 100644 --- a/ringbuffer.c +++ b/ringbuffer.c @@ -37,7 +37,7 @@ #include <time.h> #include <errno.h> -#include <wsutil/wspcap.h> +#include "wspcap.h" #include <glib.h> diff --git a/tools/checkAPIs.pl b/tools/checkAPIs.pl index bd8c69e249..667bab1b00 100755 --- a/tools/checkAPIs.pl +++ b/tools/checkAPIs.pl @@ -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; diff --git a/ui/CMakeLists.txt b/ui/CMakeLists.txt index 48f08f26b3..f430bb079b 100644 --- a/ui/CMakeLists.txt +++ b/ui/CMakeLists.txt @@ -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) diff --git a/ui/qt/capture_filter_syntax_worker.cpp b/ui/qt/capture_filter_syntax_worker.cpp index 38a5f80756..03fc52ed76 100644 --- a/ui/qt/capture_filter_syntax_worker.cpp +++ b/ui/qt/capture_filter_syntax_worker.cpp @@ -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" diff --git a/ui/qt/compiled_filter_output.cpp b/ui/qt/compiled_filter_output.cpp index 632d5239d8..e1c413cd72 100644 --- a/ui/qt/compiled_filter_output.cpp +++ b/ui/qt/compiled_filter_output.cpp @@ -13,7 +13,7 @@ #include "compiled_filter_output.h" #ifdef HAVE_LIBPCAP -#include <wsutil/wspcap.h> +#include "wspcap.h" #endif #include "capture_opts.h" diff --git a/wsutil/wspcap.h b/wspcap.h index 74245b56e7..74245b56e7 100644 --- a/wsutil/wspcap.h +++ b/wspcap.h diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt index 17c6949133..d5854dfac2 100644 --- a/wsutil/CMakeLists.txt +++ b/wsutil/CMakeLists.txt @@ -270,7 +270,6 @@ target_link_libraries(wsutil ${GCRYPT_LIBRARIES} ${WIN_WS2_32_LIBRARY} ${GNUTLS_LIBRARIES} - $<$<BOOL:${PCAP_FOUND}>:pcap::pcap> ) if(WIN32) |