summaryrefslogtreecommitdiff
path: root/config/wireshark.mpb
diff options
context:
space:
mode:
authorFrederick Hornsey <fred@hornsey.us>2018-01-17 18:14:23 -0600
committerFrederick Hornsey <fred@hornsey.us>2018-01-17 18:14:23 -0600
commitfff9b2b9f004a5a0798a2b450439e4a705d94dfb (patch)
tree648af54a4b9a382da014ae7908a3554791376383 /config/wireshark.mpb
parent9b70c75c2fed251508d167555d15db6f0d914fef (diff)
downloadMPC-fff9b2b9f004a5a0798a2b450439e4a705d94dfb.tar.gz
wireshark.mpb: Out-of-source options made OS generic
Diffstat (limited to 'config/wireshark.mpb')
-rw-r--r--config/wireshark.mpb55
1 files changed, 28 insertions, 27 deletions
diff --git a/config/wireshark.mpb b/config/wireshark.mpb
index a80bc04b..81ba739c 100644
--- a/config/wireshark.mpb
+++ b/config/wireshark.mpb
@@ -1,11 +1,8 @@
-feature(!wireshark, !wireshark2) {
+feature(!wireshark, !wireshark_cmake) {
requires += wireshark_any
}
project : glib {
-
- // Unfortunately Wireshark does not install headers for plugin
- // development; instead we rely on the source distribution:
includes += $(WIRESHARK_SRC)
specific(vc71) {
@@ -35,37 +32,41 @@ project : glib {
verbatim(nmake, top, 1) {
include $(WIRESHARK_SRC)/config.nmake
}
-
- specific(!prop:windows) {
- libpaths += $(WIRESHARK_SRC)/wiretap/.libs $(WIRESHARK_SRC)/epan/.libs
- lit_libs += wiretap wireshark
- }
}
+// Autoconf / In Source Wireshark Build Method
+// This one is how the Wireshark Developers Guide says to build Wireshark on
+// Linux (autogen.sh).
+// This is also used for older 1.x Wireshark Windows builds.
feature(wireshark) {
- avoids += wireshark2
+ avoids += wireshark_cmake
specific(prop:windows) {
libpaths += $(WIRESHARK_SRC)/wiretap $(WIRESHARK_SRC)/epan
lit_libs += wiretap-$(WIRETAP_VERSION) libwireshark
+ } else {
+ libpaths += $(WIRESHARK_SRC)/wiretap/.libs $(WIRESHARK_SRC)/epan/.libs
+ lit_libs += wiretap wireshark
}
}
-feature(wireshark2) {
+// CMake out of source builds of Wireshark are used in the Developers Guide
+// for Windows and macOS. This can also be used on Linux if built using CMake.
+// To use build against them we need two absolute
+// paths:
+// WIRESHARK_BUILD
+// The location of the build that the user choose when building Wireshark.
+// It must contain the config.h file after building Wireshark.
+// WIRESHARK_LIB
+// The location of the wireshark dynamic libraries located within
+// WIRESHARK_BUILD.
+// For Windows this might be:
+// %WIRESHARK_BUILD%\run\RelWithDebInfo
+// For macOS this might be:
+// $WIRESHARK_BUILD/run/Wireshark.app/Contents/PlugIns/wireshark
+feature(wireshark_cmake) {
avoids += wireshark
- // Because building Wireshark 2 on Windows is a CMake out of source build, we
- // need a few more parameters:
- // WIRESHARK2_BUILD is the build folder, which should contain config.h
- // WIRESHARK2_BIN is the folder where the executables and libraries were
- // placed. This is likely $WIRESHARK2_BUILD\run\RelWithDebInfo, so it is
- // the default, but is left as an option in case the build configuration is
- // different.
- expand(WIRESHARK2_BIN) {
- $WIRESHARK2_BIN
- $WIRESHARK2_BUILD\run\RelWithDebInfo
- }
- specific(prop:windows) {
- includes += $(WIRESHARK2_BUILD)
- libpaths += $(WIRESHARK2_BIN)
- lit_libs += wiretap wireshark wsutil
- }
+
+ includes += $(WIRESHARK_BUILD)
+ libpaths += $(WIRESHARK_LIB)
+ lit_libs += wiretap wireshark wsutil
}