aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
AgeCommit message (Collapse)AuthorFilesLines
2020-10-19CMake: Make pkg-config functions quietJoão Valverde2-4/+4
2020-10-19CMake: Configure our .y files for different Bison/YACC flavors.Gerald Combs1-1/+16
Bison 3.4 and later generate deprecation warnings for the "%pure-parser" directive. As https://git.savannah.gnu.org/cgit/bison.git/tree/NEWS says, ---- ** Deprecated features The %pure-parser directive is deprecated in favor of '%define api.pure' since Bison 2.3b (2008-05-27), but no warning was issued; there is one now. Note that since Bison 2.7 you are strongly encouraged to use '%define api.pure full' instead of '%define api.pure'. ---- Rename our .y files to .y.in, and modify FindYACC.cmake to detect newer versions of Bison and configure our .y files with "%pure-parser" or "%define api.pure" as needed. Squelches warnings from Bison in #16924.
2020-10-03RTP: opus playbackLin Sun1-0/+57
It's possible to play opus payload with libopus (https://opus-codec.org/). Closes #16882. Helped-by: Pascal Quantin <pascal.quantin@gmail.com> Signed-off-by: Lin Sun <lin.sun@zoom.us> Signed-off-by: Yuanzhi Li <ryanlee@mail.ustc.edu.cn>
2020-09-12CMake: Fix libssh >= 0.9.5 version detectionJoão Valverde1-3/+9
libssh 0.9.5 moved version macros to a different header file. Closes #16845
2020-07-21Windows: Switch from the WpdPack SDK to vcpkg's libpcap.Gerald Combs1-38/+34
Switch from WinPcap's WpdPack SDK to a libpcap package built with vcpkg. We explictly load wpcap.dll on Windows, so make sure we don't link with pcap.lib. Move timestamp code from capture-pcap-util-unix.c to capture-pcap-util.c. Add timestap routines to capture-wpcap.c and make a couple of other updates. Change-Id: If0e3dbeb7378c42ed9e3f91b2f15add95d22a2bb Reviewed-on: https://code.wireshark.org/review/37905 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-19FindWinSparkle.cmake: Fix a comment.Gerald Combs1-1/+1
Change-Id: If31ec4f771a8576b91005852d7443248b4be08f5 Reviewed-on: https://code.wireshark.org/review/37906 Reviewed-by: Guy Harris <gharris@sonic.net>
2020-07-16extcap: assume we're using libssh 0.6 or later.Guy Harris1-12/+0
We require 0.6 or later in CMakeLists.txt, and both ssh_version() and LIBSSH_VERSION having to be fed to SSH_STRINGIFY() date back before 0.5, so just assume ssh_version() is available and LIBSSH_VERSION has to be fed to SSH_STRINGIFY(). Change-Id: I4f62a720424383f88e0410cad07dbe67d0c69297 Reviewed-on: https://code.wireshark.org/review/37881 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Guy Harris <gharris@sonic.net>
2020-07-16extcap: get the libssh version string from the libssh.h header.Guy Harris1-1/+0
Thanks, libssh developers, for making it so straightforward! This means we don't need to construct it in the CMake module that finds libssh. Change-Id: I6c173bf7c0671dfdfac423a7d01ecced7b69e851 Reviewed-on: https://code.wireshark.org/review/37878 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-15Show the version of libssh being used, if possible.Guy Harris1-0/+14
If we have ssh_version(), then ssh_version(0) will return a string for the version being used. Change-Id: I0717f6d4d5c3fa04aa7938dc6bc0d4c8abfa95fd Reviewed-on: https://code.wireshark.org/review/37875 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <gharris@sonic.net>
2020-07-15extcap: add libssh version info to sshdump and ciscodump.Dario Lombardo1-0/+1
Change-Id: I1e13cc3471e37514a0dd181abd4938607a057ec6 Reviewed-on: https://code.wireshark.org/review/37870 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-26packet-kerberos: add support for decrypting KRB5 FAST messagesStefan Metzmacher1-0/+4
Currently this is only available for MIT Kerberos, but it should be possible to implement the same using krb5_crypto_fx_cf2() from Heimdal. Change-Id: Ic3327dfde770f9345485bf97e2ac6045b909b64e Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-on: https://code.wireshark.org/review/36472 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-01CMake: Fix FindGLIB2 for saner outputJoão Valverde1-1/+3
Apparently FindPackageHandleStandardArgs uses if(DEFINED ...) to test VERSION_VAR, for somewhat obscure reasons. If we didn't find a suitable GLib package we must not define GLIB2_VERSION, otherwise the status output is confused and just generally wrong. Change-Id: Iad4012e69a7c641c50d1e399bbfdb51583cb3b40 Reviewed-on: https://code.wireshark.org/review/36990 Reviewed-by: João Valverde <j@v6e.pt> Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-04-29CMake: Increase our AsciidoctrJ JVM memory limits.Gerald Combs1-3/+3
One of the builds recently failed with: Generating user-guide.pdf Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded Change-Id: I542a39880dffcd3d7bbaec1a180c605b3011c2e2 Reviewed-on: https://code.wireshark.org/review/36966 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-04-13CMake: fix another Windows specific warning reported by CMake 3.17Pascal Quantin1-1/+1
Newer version of CMake complains with warnings like the one below: The package name passed to `find_package_handle_standard_args` (POWERSHELL) does not match the name of the calling package (PowerShell). This can lead to problems in calling code that expects `find_package` result variables (e.g., `_FOUND`) to follow a certain pattern. Change the capitalization of the variables to match the filename. Change-Id: I5bd763add92e9e279f8e28f31576acb5b9ea7776 Reviewed-on: https://code.wireshark.org/review/36833 Petri-Dish: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-04-09Docbook: Fix an unterminated tag, other updates.Gerald Combs1-0/+2
Remove nested example tags from the dissection chapter, including and unbalanced one. Mark our source blocks with [source,c]. Enable syntax highlighting in the Developer's and User's guides. This isn't supported in the DocBook backend (which we use to generate the HTML guides), but it is in the PDF backend. Add a comment about failing on warnings when we generate our guides. Change-Id: Ieee29fe75364ca23769aa997f90126e31b72cc8b Reviewed-on: https://code.wireshark.org/review/36767 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <gharris@sonic.net> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-04-05CMake: fix some warnings reported by CMake 3.17Pascal Quantin7-7/+7
Newer version of CMake complains with warnings like the one below: The package name passed to `find_package_handle_standard_args` (MINIZIP) does not match the name of the calling package (Minizip). This can lead to problems in calling code that expects `find_package` result variables (e.g., `_FOUND`) to follow a certain pattern. Change the capitalization of the variables to match the filename. Change-Id: Ic3c88f33f5a2bfeba3fa3479df60210e67d25ff0 Reviewed-on: https://code.wireshark.org/review/36695 Petri-Dish: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-19CMake: fix detection of Lua development packagePascal Quantin1-3/+3
See https://www.wireshark.org/lists/wireshark-dev/202003/msg00054.html Change-Id: I10a854a4dcd5320fce8ca3e6ff5722225c56c5d9 Reviewed-on: https://code.wireshark.org/review/36494 Petri-Dish: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-13Remove trailing whitespace.Guy Harris1-2/+2
Change-Id: I88117a93e64feb310ecd0f9f558656b29b83e815 Reviewed-on: https://code.wireshark.org/review/36384 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2020-03-13Require at least libpcap 0.8/WinPcap 3.1.Guy Harris1-53/+61
2004 called, they want their libpcap/WinPcap back. RHEL 6 initially shipped with libpcap 1.0; even old Enterprise(TM) versions of OSes ship with something shinier than 0.7.x these days. This lets us get rid of a bunch of #ifdefs and workaround code for missing APIs. Change-Id: I862cb027418b0a0c0f45a26979acea82f93f833b Reviewed-on: https://code.wireshark.org/review/36383 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2020-02-12CMake: Fix WinSparkle discovery.Gerald Combs1-1/+1
g46b3753d53 changed "ws_find_package(WINSPARKLE ..." to "ws_find_package(WinSparkle ..." in CMakeLists.txt in order to fix an issue with case-sensitive folders. This exposed a different issue in FindWinSparkle.cmake, where we were passing "WINSPARKLE" to find_package_handle_standard_args. When successful this would set WINSPARKLE_FOUND, which would in turn *not* match WinSparkle_FOUND in ws_find_package, which means that we wouldn't enable automatic updates. Pass "WinSparkle" to find_package_handle_standard_args instead. Using a mixed-case package name results in setting both PackageName_FOUND and PACKAGENAME_FOUND, which fixes our various checks. Bug: 16381 Change-Id: I46ef98194dc060ad37d9a30bff4d9e905713759e Reviewed-on: https://code.wireshark.org/review/36079 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-01Check for liblua-{version} as well as liblua{version}.Guy Harris1-1/+1
FreeBSD packages install liblua-{version}. Change-Id: Ib28d2032a13baff9da42d61e3054a8b8e64b5cc9 Reviewed-on: https://code.wireshark.org/review/35994 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2020-01-20RTP: decode iLBC payloadJirka Novak1-0/+77
It is possible to decode iLBC payload. It uses libilbc library (https://github.com/TimothyGu/libilbc). Bug: 16314 Change-Id: Id4cad7ae32305a0e94ef32beb24e07733d7f834e Reviewed-on: https://code.wireshark.org/review/35686 Reviewed-by: João Valverde <j@v6e.pt> Petri-Dish: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-10packet-kerberos: try to fix the build on macOS 10.14Gerald Combs1-0/+1
/usr/lib/libkrb5.dylib doesn't have krb5_pac_verify(). This hopefully fixes the build problem introduced by commit d9aab840a75ededc286b8e9894e5af7ce6298bbc Change-Id: Ib354a59cbc20c6bf97ddc029d8b042d4aea6dae9 Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-on: https://code.wireshark.org/review/35713 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-01-07case-sensitive: Fix casing for PCAP and WinSparkleMartin Boye Petersen1-2/+2
CMake is unable to find PCAP and WinSparkle under Windows when using case sensitive folders. Change-Id: I30ba4073afc6089b08cef3c010b09c257362929b Reviewed-on: https://code.wireshark.org/review/35505 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-12-20CMake: Create a DocBook stamp file for Visual Studio.Gerald Combs1-1/+11
Create user-guide.xml-stamp and developer-guide.xml-stamp when building under Visual Studio. Fixes C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(231,5): warning MSB8064: Custom build for item "C:\buildbot\builders\wireshark-master-32\windows-2019-x86\build\cmbuild\CMakeFiles\8721ce5c0a51a8e0d8e35fd55fbe2e6e\user-guide.hhp.rule" succeeded, but specified dependency "c:\buildbot\builders\wireshark-master-32\windows-2019-x86\build\cmbuild\docbook\user-guide.xml-stamp" does not exist. This may cause incremental build to work incorrectly. [C:\buildbot\builders\wireshark-master-32\windows-2019-x86\build\cmbuild\docbook\user_guide_chm.vcxproj] when building the user_guide_chm target. Change-Id: Ia224823841b4d3def3436f9f3a48b759694ffb37 Reviewed-on: https://code.wireshark.org/review/35509 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-12-11CMake: Fixup a variable in FindLZ4.cmakeGerald Combs1-1/+1
Set "LZ4_PDB" instead of "LZ4_pdb" in FindLZ4.cmake so that CMake 3.16 will convert "${LZ4_DLL_DIR}/${LZ4_PDB}" to the full path to the LZ4 .pdb instead of its parent directory. This in turn ensures that we don't pass a directory as a source argument to `cmake -E copy_if_different`, which causes it to crash. Bug: 16271 Change-Id: Id6f37584379bd07bc929bc5cb5e80cbe60a3c77e Reviewed-on: https://code.wireshark.org/review/35400 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-11-15CMake: Work correctly without Sparkle.Gerald Combs1-3/+12
Set or clear SPARKLE_LIBRARIES and SPARKLE_INCLUDE_DIRS in FindSparkle.cmake, similar to what we do in other modules. Use them instead of SPARKLE_LIBRARY and SPARKLE_INCLUDE_DIR. Change-Id: I023c711edd6a44421aadf85413da3207d9b08e64 Reviewed-on: https://code.wireshark.org/review/35097 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-15macOS: Add support for automatic updates using Sparkle.Gerald Combs1-0/+22
Add support for automatic updates using the Sparkle framework. Add FindSparkle.cmake and associated CMake plumbing. Add a public key and other info to Info.plist.in. Add ui/macosx/sparkle_bridge.{h,m}, which wraps the Sparkle API. Make code that's specific to WinSparkle Windows-only. Add Sparkle installation steps to the macos-setup scripts. Sparkle prints a warning if your bundle is unsigned (which is the case during development) so disable installing it by default. Updating here takes a long time. We might be able to fix that by shipping our DSYMs separately. Change-Id: I6cc6671db5657dadc514bda6bf6e1c8bbc9468a5 Reviewed-on: https://code.wireshark.org/review/35090 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-11-08CMake+docbook: Fixup our .chm titles.Gerald Combs1-7/+7
Some parts of HTML Help have issues displaying curly quotes. Add a title argument to the XML2HHP macro so that we can set one with a straight quote. Set the title using the htmlhelp.title XSL parameter instead of relying on HTML Help to derive it for us. This seems to keep "???TITLE???" from being mysteriously appended to the title. Try setting htmlhelp.window.geometry while we're here. Bug: 16183 Change-Id: I0bf2dbeeb811dc65010ab5223725d6b5cdc96966 Reviewed-on: https://code.wireshark.org/review/35031 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-10-10Revert "CMake: Don't install HTML manuals twice"João Valverde1-37/+0
This reverts commit f1285fcf061669702ca1accd7b2c50ebc8198993. NSIS package is broken with this commit. Change-Id: Ief22a308edad188fa2d5fab79355f19493359fa6 Reviewed-on: https://code.wireshark.org/review/34758 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2019-10-09CMake: Don't install HTML manuals twiceJoão Valverde1-0/+37
HTML docs are installed to both $docdir and $pkgdatadir. Fix that to install to $docdir only. Change-Id: I115158585b6df9170d9a01249adbc8548df91f14 Reviewed-on: https://code.wireshark.org/review/34640 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2019-10-02CMake: Make FindWSLibrary compatible with older CMakeTomasz Moń1-1/+2
On Linux we support CMake 3.5 so we cannot use cmake_parser_arguments() with PARSE_ARGV option that was added in CMake 3.7. Change-Id: I84e7b679c2a73e5a7a29ac83a3283aedf542f9a4 Reviewed-on: https://code.wireshark.org/review/34674 Petri-Dish: Pascal Quantin <pascal@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-09-28CMake: Use glib debug dlls in Windows debug buildsTomasz Moń4-42/+127
This prevents the mix of debug/release Universal CRT library in a Wireshark. Bug: 16030 Change-Id: I2961541824caf3bef0a08c72b242427b5406a9bd Reviewed-on: https://code.wireshark.org/review/34444 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-08-28cmake: fix issue when zstd is missing.Dario Lombardo1-10/+12
We need to check the library version only when the it's present, otherwise we hit an error. Change-Id: I6323b19d0023d466bfb6ae4b5751f376fc213fa4 Reviewed-on: https://code.wireshark.org/review/34387 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-08-27cmake: check minimum zstd library version.Dario Lombardo1-1/+14
The APIs used in the kafka dissector have been introduced in version 1.0.0, then we need at least that version to work. Change-Id: I80ded2362d4f324ec26392bd7a9781ea6d9ba630 Reviewed-on: https://code.wireshark.org/review/34382 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-08-20Kafka: include zstd compression in Kafka message batchesPiotr Smolinski1-0/+58
Change-Id: I1d06486ccf7b174ee9aa621fa3d8acb8b3673777 Reviewed-on: https://code.wireshark.org/review/34222 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-08-16Windows: add nghttp2.pdb file to our PDB .zipPascal Quantin1-2/+7
Change-Id: I496959a04fdbd7a275d772600736bde63ac8b14e Reviewed-on: https://code.wireshark.org/review/34307 Petri-Dish: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-08-16Windows: upgrade Npcap to 0.9982, USBPcap to 1.5.3.0 and nghttp2 to 1.39.2Pascal Quantin1-1/+1
Change-Id: I9dcff1c6714c6bbe211997195ff78537c334fdbd Reviewed-on: https://code.wireshark.org/review/34303 Petri-Dish: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-07-27HTTPS In More Places, update some URLs.Guy Harris2-2/+2
Change-Id: Ice2e1e2e4d94f6c9da7c651866cfa1a8ac4a31d8 Reviewed-on: https://code.wireshark.org/review/34096 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26HTTPS (almost) everywhere.Guy Harris1-1/+1
Change all wireshark.org URLs to use https. Fix some broken links while we're at it. Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c Reviewed-on: https://code.wireshark.org/review/34089 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-21Remove ABI compliance checker code.João Valverde1-30/+0
It's broken, unmaintained, poorly implemented and obsoleted by saner debug-info methods. Note: To do the compliance check properly would require much more extensive work to clearly define public and private interfaces (without manual bookeeping of files or symbols either, of course, because who would want that...). Change-Id: Ib801f3c152ca2369f95ca1f4af4d37cd8cc7c47a Reviewed-on: https://code.wireshark.org/review/33928 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>
2019-07-17Qt: Import Profile informationRoland Knall1-0/+52
Allow easy import of profiles. Profiles must be stored inside a zip file, with no additional hierarchy. Change-Id: I0ae77460c20ef6b3e447906e671b0cefa6b9b032 Reviewed-on: https://code.wireshark.org/review/33881 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2019-05-03CMake: Add libpcap imported library targetJoão Valverde1-0/+8
Change-Id: I5326b87784817fb353329e2d686fe0515c32f6cb Reviewed-on: https://code.wireshark.org/review/33038 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>
2019-05-02CMake: Check for and use system SpeexDSP libraryJoão Valverde1-0/+38
Change-Id: I8443379d23a2946dd21c12e5e0bd5464ab73ca25 Reviewed-on: https://code.wireshark.org/review/31857 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2019-04-29FindPCAP: fix broken search logicPeter Wu1-193/+123
Do not fully trust the output from neither pkg-config nor pcap-config. These tools might provide bogus output. Instead, use their outputs as hints to let CMake find the correct include and (static) library paths. Correct some variable names (PCAP_STATIC_LIBRARIES and PCAP_INCLUDE_DIRS *must not* be the result of find_path/find_library) and ensure that an empty include directory from pkg-config does not result in an empty PCAP_INCLUDE_DIRS variable that would break the build. Change-Id: If3de90fb497d8163d92e4fe190a227159f0b6acb Fixes: v3.1.0rc0-645-gc602119bcf ("Use pkg-config if possible; if not, use pcap-config if present.") Reviewed-on: https://code.wireshark.org/review/32999 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-27Use pkg-config if possible; if not, use pcap-config if present.Guy Harris1-32/+219
First try finding libpcap with pkg-config. If that fails (either because the system doesn't have pkg-config or because it does but there's no .pc file for libpcap), check for pcap-config and, if it's present, use that, otherwise fall back on manually searching for it. Pick up the code from tcpdump's FindPCAP.cmake. Change-Id: I87963aaa7cccac0b5cd942f48eb5d08779695f92 Reviewed-on: https://code.wireshark.org/review/32992 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-04-25Do FIND_PACKAGE_HANDLE_STANDARD_ARGS() before checking ZLIB_FOUND.Guy Harris1-8/+6
It's what sets {package}_FOUND. Combine two "do this if zlib was found" blocks. Change-Id: I55062a11c7ae7e6f32886615a0201df55f700d1e Reviewed-on: https://code.wireshark.org/review/32974 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-04-25Don't look for zlib stuff if we didn't find zlib.Guy Harris1-45/+46
If we didn't find zlib, don't look for its version number in zlib.h, and don't look for inflate() or inflatePrime() in the library. Trim off some trailing blank lines while we're at it. Change-Id: I834a9a76928a00cf5e182bd4224ebc91d36d69a4 Reviewed-on: https://code.wireshark.org/review/32973 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-04-24FindXml2: use pkg-config to find libxml2 dependenciesFabrice Fontaine1-4/+11
On UNIX, when statically built, libxml2 can depends on other libraries such as lzma. These dependencies are already retrieved through pkg-config so append them to LIBXML2_LIBRARIES otherwise static build will fail Change-Id: I362064969488ec53042aa323eadb54fef026d8a5 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Reviewed-on: https://code.wireshark.org/review/32968 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-24FindPCAP: use pkg-config to find pcap dependenciesFabrice Fontaine1-0/+10
On UNIX, when statically built, pcap can depends on other libraries such as -lnl-3. Add a call to pkg-config to find them and append them to PCAP_LIBRARIES (and so to CMAKE_REQUIRED_LIBRARIES) otherwise all check_function_exists calls will fail Change-Id: I98361c05553738d015310fae76c17dfc08e131ff Ping-Bug: 15713 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Reviewed-on: https://code.wireshark.org/review/32946 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>