aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
AgeCommit message (Collapse)AuthorFilesLines
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>
2019-04-22Add brotli decompression support for HTTP and HTTP2 dissectors.Dániel Bakai1-0/+50
Change-Id: I9c09f55673187f6fee723fcd72798fb6b9958b03 Reviewed-on: https://code.wireshark.org/review/32745 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-19CMake: bail out if minimum GLib version is not satisfiedPeter Wu1-11/+24
Require glibconfig.h to be found and extract the version from this file, this has been present since the original GLib commit and is still present in the meson build system introduced with 2.53.4. Bug: 15706 Change-Id: I2e938a339d48d6815ed7cc46462735b93418377f Reviewed-on: https://code.wireshark.org/review/32894 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-09Windows: Use an lz4 DLL built with vcpkg.Gerald Combs1-2/+8
Update the Windows build environment to use lz4 packages built from a VS 2017 command prompt with set LZ4_VERSION=1.8.3 vcpkg remove lz4:x86-windows lz4:x64-windows vcpkg install lz4:x86-windows lz4:x64-windows vcpkg export lz4:x86-windows --output=lz4-%LZ4_VERSION%-win32ws --zip vcpkg export lz4:x64-windows --output=lz4-%LZ4_VERSION%-win64ws --zip The packages also include a PDB, so copy it to the build directory and add it to the PDB .zip. Change-Id: Icea512405d2085e5b271fa4a3ba8c0fe318b8cb5 Reviewed-on: https://code.wireshark.org/review/32785 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-04-01Fix our .chm titles.Gerald Combs1-2/+7
HTML Help has trouble rendering both straight (') and curly (’) quotes in its window titles. Make sure we remove them. Bug: 15656 Change-Id: Ic7ab6652e285c11e50e4acb3fab4fcc12653778c Reviewed-on: https://code.wireshark.org/review/32674 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-03-18Windows: Start using a `vcpkg export` bundle.Gerald Combs6-42/+91
Create a library bundle using `vcpkg export ... --zip` as described at https://vcpkg.readthedocs.io/en/latest/users/integration/#export-command. The bundle includes the following packages: gettext 0.19-8 glib 2.52.3-13 libffi 3.1-4 libiconv 1.15-5 liblzma 5.2.4 libxml2 2.9.9-4 pcre 8.41-1 zlib 1.2.11-5 It also includes a CMake toolchain file which we might want to make use of in the future. This means we no longer compile Zlib locally. Update the CMake environment accordingly and remove zlib from win-setup.ps1. It includes PDBs, so add them to the PDB .zip. Change-Id: I0a94904a86d836e990019dab62af506573be1f35 Reviewed-on: https://code.wireshark.org/review/31377 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-11CMake: remove unused FindMACOS_FRAMEWORKS.cmake filePeter Wu1-22/+0
This was added in v1.99.0-rc1-578-gdbd409d041, but was never used. Change-Id: Ieb202693d555ff62ff13aca46b0f289f0d4c6cfb Reviewed-on: https://code.wireshark.org/review/31959 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-06Windows: Upgrade Kerberos to 1.17.Gerald Combs1-1/+1
Recent versions of Kerberos are much easier to compile on Windows. Switch to version 1.17, compiled with Visual Studio 2017 and linked with the Universal CRT. Change-Id: I393d51666cd13255ee1419f2164d7fa59fe1c5cb Reviewed-on: https://code.wireshark.org/review/31919 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-04CMake: Update FindLibXml2.cmakeJoão Valverde2-64/+89
Change-Id: I55f77910be642535cba128900c2af40fa6824f04 Reviewed-on: https://code.wireshark.org/review/31874 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2019-01-31CMake: rewrite FindSystemd.cmake filePeter Wu1-34/+30
Clarify that this is only needed for the sdjournal extcap interface and report the found version in the CMake output. Change-Id: I40bc540631bda32d0b92e4fcd59d8c1726606d86 Reviewed-on: https://code.wireshark.org/review/31834 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-23CMake: fix failure to locate zlib (and possibly libssh)Peter Wu1-1/+2
Include directories are no longer globally included, be explicit with the required include directories or else function checks will fail. Change-Id: I72d88f94854fcfe6529554f84e49d1dba696e9df Fixes: v2.9.1rc0-436-ga3991874eb ("CMake: Replace PACKAGELIST magic") Reviewed-on: https://code.wireshark.org/review/31693 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-19CMake: do not set an invalid INSTALL_RPATH for (plugin) librariesJoão Valverde1-0/+1
CMAKE_INSTALL_RPATH also applies to libraries such as plugins. This should not happen when relative RPATHs (through $ORIGIN) are in use, so fix that. Change-Id: I154d93ba6ed66c2f78a42b25e352b5b54e9b8818 Reviewed-on: https://code.wireshark.org/review/31609 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-18CMake: Fix Vcpkg x86 directory discovery.Gerald Combs1-1/+8
`vcpkg export` installs files into an architecture-dependent subdirectory which matches the PLATFORM environment variable on 64-bit Windows but not 32-bit Windows. Replace $ENV{PLATFORM} in FindWSWinLibs with a variable derived from WIRESHARK_TARGET_PLATFORM. Change-Id: I142615bd50179fdffdebd2bb1f193ef0070c0483 Reviewed-on: https://code.wireshark.org/review/31582 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-14Windows: Use a c-ares DLL built with vcpkg.Gerald Combs2-4/+14
Update the Windows build environment to use c-ares packages built from a VS 2017 command prompt with set CARES_VERSION=1.15.0 vcpkg install c-ares:x86-windows c-ares:x64-windows vcpkg export c-ares:x86-windows --output=c-ares-%CARES_VERSION%-win32ws --zip vcpkg export c-ares:x64-windows --output=c-ares-%CARES_VERSION%-win64ws --zip The packages also include a PDB, so copy it to the build directory and add it to the PDB .zip. Change-Id: I1887ca89d897bea184144315219b366096519961 Reviewed-on: https://code.wireshark.org/review/31376 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-01-13CMake: Don't go on about "custom files"João Valverde1-3/+1
For each call of add_custom_cmake_include() CMake prints STATUS "No custom file found in <full_path>". This is noisy, not to mention confusing. Print output only if a custom include is found, be silent otherwise. Change-Id: If603d206486354993ebac8e4c61f6876a26223d3 Reviewed-on: https://code.wireshark.org/review/31517 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-12CMake: Fix inconsistent find_package() report outputJoão Valverde9-9/+9
Most CMake find modules report the binary found, the modules fixed by this change represent an inconsistent exception. The first REQUIRED_VAR argument to find_package_handle_standard_args() is the one used by CMake to report on the result of find_package(). Compare (master) -- Found SNAPPY: /usr/include to (this change) -- Found SNAPPY: /usr/lib/x86_64-linux-gnu/libsnappy.so This convention of using XXX_LIBRARY matches upstream practice. Change-Id: Iaa0ec644e963430d73722354f6ee2a3694906ba7 Reviewed-on: https://code.wireshark.org/review/31498 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-10CMake: try harder to find the right Python versionPeter Wu1-1/+3
The FindPythonInterp module does not verify that a discovered 'python' program is actually Python 3. Replace this deprecated module by a modern version that was introduced with CMake 3.12. Remove PYTHON_EXECUTABLE from WSDG now that it is much more likely that CMake discovers the right version. Change-Id: I1f8438baced3d5bf9e1e2732980ad177d3257ca3 Reviewed-on: https://code.wireshark.org/review/31468 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-01-09CMake: remove LocatePythonExecutable.cmake for WindowsPeter Wu1-22/+0
Cygwin is now unsupported, so remove special handling for it and rely on FindPythonInterp.cmake to locate an appropriate version. This patch can only cause issues if the PATH environment variable contains the Cygwin binary directory without any native Python version appearing before that. In that case, either remove Cygwin from PATH or add the native Python (e.g. C:\Python37) earlier in PATH. Change-Id: Ia5554e5a83d06a941dacf4a28d41d84fca4fe99d Reviewed-on: https://code.wireshark.org/review/31453 Petri-Dish: Peter Wu <peter@lekensteyn.nl> 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-01-09CMake,WSDG: Remove Cygwin supportPeter Wu7-188/+11
Declare Cygwin as unsupported and remove all supporting code. Simplify some Chocolatey notes in the WSDG. Remove FindPerl.cmake as it only existed to force use of Wireshark's bundled FindCygwin.cmake (bug 13922). FindXSLTPROC.cmake special handling for Cygwin was also removed, in theory this could cause issues when the PATH contains a Cygwin xsltproc, but it's unsupported anyway. Change-Id: Iabfac2b4a9fd930530505d27bdba618bdb8f7f34 Reviewed-on: https://code.wireshark.org/review/31452 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-31CMake: clean up FindGNUTLS.cmakePeter Wu1-39/+27
Use consistent capitalization and whitespace. Remove library names from find_library that are unsuitable. No functional change intended. Change-Id: Ic40516542777d768b6eef656fe5c0a0af143fb7e Reviewed-on: https://code.wireshark.org/review/31264 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-31Windows: Upgrade GnuTLS to 1.6.3Peter Wu2-2/+6
Upgrade to GnuTLS 3.6.3-1, using MinGW binaries from Fedora 29 packages: mingw64-gnutls-3.6.3-1.fc29.noarch.rpm mingw64-gcc-8.2.0-3.fc29.x86_64.rpm mingw64-gmp-6.1.2-4.fc29.noarch.rpm mingw64-nettle-3.4-2.fc29.noarch.rpm mingw64-p11-kit-0.23.7-5.fc29.noarch.rpm mingw64-libffi-3.1-4.fc29.noarch.rpm mingw64-libtasn1-4.13-3.fc29.noarch.rpm mingw64-winpthreads-5.0.4-2.fc29.noarch.rpm This includes libgcc_s_seh-1.dll (64-bit, new) and libgcc_s_sjlj-1.dll (32-bit, previously included with glib2). Built with https://git.lekensteyn.nl/peter/wireshark-notes/tree/windows-libs/make-gnutls-libs-zip.sh?id=b86878e458d5d7deb21218ce6598b98af4ed7ec2 The main motivation is improved PKCS #11 support: - 3.6.0: fix potential compatibility issue with SafeNet HSMs https://gitlab.com/gnutls/gnutls/merge_requests/398/ - 3.6.2: gnutls_pkcs11_token_get_flags now forwards token info. - 3.6.3: new APIs for low-level PKCS #11 token or object operations. Change-Id: I235774e3b27f3426cb74d3d9c0ab593d06870e89 Reviewed-on: https://code.wireshark.org/review/31128 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-30CMake: clean up FindGCRYPT.cmakePeter Wu1-31/+32
Use consistent lowercase capitalization and whitespace. Windows: clarify libgpg-error names and remove libgcc_s (1.7.6/1.8.3 do not need it). Change-Id: I5d1b1a67f7a992ccfca4c28d0e19bbbfc41b7a4d Reviewed-on: https://code.wireshark.org/review/31244 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-12-29Windows: fix handling of Unicode paths in LuaPeter Wu1-1/+1
Lua internally uses ANSI C APIs (such as fopen). On many systems (macOS and Linux for example) these work fine with UTF-8. Windows however requires special Unicode APIs (such as _wfopen), so patch the Lua library to interpret paths are UTF-8 and call appropriate Unicode APIs. Changes compared to the previous LuaBinaries zip archive: - Patched with UTF-8 support for loadfile, os.execute, etc. - Built with VS 2015 (VCRUNTIME140.dll) instead of MinGW (MSVCRT.dll). - Includes PDB file for lua52.dll - Includes lua52.exe and luac52.exe with UTF-8 argv support (wmain). - Includes build scripts, source files and README.md. - Extra subdirectory named after the zip file. These zip files are taken from https://github.com/Lekensteyn/lua-unicode (the "prepared" source zips can be found here as well.) Bug: 15118 Change-Id: I219f046d6e0fd5093287b5d6503a48ba7d1fc6a4 Reviewed-on: https://code.wireshark.org/review/31165 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-30NSIS: Install NPcap instead of WinPcap.Gerald Combs1-1/+1
Install NPcap 0.99-r7 instead of WinPcap in the NSIS installer. Update and/or remove installer text, variables, and variable names accordingly. Change-Id: Ied36f00c2516127969894f55698e70401dfffb4f Reviewed-on: https://code.wireshark.org/review/30829 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-20Drop JSON-GLib completelyPeter Wu2-92/+2
JSON-GLib was added in v2.9.0rc0-201-g511c2e166a, but is no longer necessary since we have a home-grown JSON dumper (wsutil/json_dumper.h). Remove the remaining traces and additionally remove GObject from FindGLIB2.cmake since it was only added for JSON-GLib. Change-Id: If9dfd2c60cec130f98109d100bdb6618bde06ba0 Reviewed-on: https://code.wireshark.org/review/30733 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-07Require Python 3, drop Python 2 supportPeter Wu2-4/+7
Python 3 is widely available. All major Linux distributions support it. RHEL is covered via EPEL (which is already required for cmake3). Drop support for Python 2 in order to reduce maintenance costs. The main motivation is being able to simplify the tests. CMake is updated to search for Python >= 3.4 and will fail if unavailable (generating dissectors.c requires Python, so it is quite an important piece to have). The documentation is updated to reflect the Python 3.7 paths used by Chocolatey. Tested the git-review installation instructions in Windows 7 x64 without a previous Chocolatey installation. macOS brew now installs Python 3 (its dependencies are already installed by python@2 for libxml2). The macOS (non-brew variant) is updated to use the official 64-bit installer to install Python 3. Change-Id: I80b1e36957f338e0dad1bfcc173b6418682cddba Reviewed-on: https://code.wireshark.org/review/30192 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-06Windows: fix RC information generationPascal Quantin1-3/+3
Change-Id: I36e1da16b7eb8c224dab74750939a2c9a9a01cfa Reviewed-on: https://code.wireshark.org/review/30525 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-10-21lemon: sync with upstream (2018-09-08)Peter Wu1-1/+2
Changes: - Drop the old basename modification that was present in the Wireshark version of lemon.c. Use a new option available since 2018-04-20 ("Add the -dDIRECTORY command-line option to LEMON.") - Redo the static analyzer warning fixes, identifying the root causes and adding assertions instead of hiding code with __clang_analyzer__. - Ignore compiler warnings instead of adding config.h, _U_, extra const keywords, unsigned/signed changes, etc. - Remove lemon.html, it is out-of-date and external links are available. In order to make future updates easier, document the exact steps that were followed to create the lemon.c and lempar.c files. Future changes SHOULD follow the same process. My process to reach this updated lemon version: 1. Identify previous sync. Found v2.5.2rc0-147-g653af0f6d0 ("lemon: Sync with latest trunk.") which seems based on sqlite commit 2b3d584ffe. 2. Check successive Wireshark patches. Identified many non-functional changes to silence compiler warnings and static analyzer issues. Found one feature (basename) that can be replaced with upstream -d. 3. Write minimal patches and document changes. Upstream typos and coding style issues (other than trailing whitespace) were deliberately not fixed to remain as close as possible to upstream. Change-Id: I606f46dede86e34520f962a9e7163912392aad57 Reviewed-on: https://code.wireshark.org/review/30290 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-18FindM.cmake: directly pass -lm to fix selective static linkingPeter Wu1-2/+1
When CMAKE_FIND_LIBRARY_SUFFIXES is set to ".a" (in order to find only static libraries), executables would be linked with libm.a. This fails when the C runtime is not statically linked as well: https://bugzilla.redhat.com/show_bug.cgi?id=1433347 Change-Id: I1480607bd3d0678661694657a2709ee1c56f9530 Reviewed-on: https://code.wireshark.org/review/30253 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-18FindGLIB2.cmake: workaround to make static linking workPeter Wu1-0/+5
When using pkg_search_module(GLIB2 glib-2.0), it will also include transitive dependencies (pcre) in GLIB2_STATIC_LIBRARIES, but it will still lack -pthread (which is in GLIB2_STATIC_LDFLAGS). For simplicity just hardcode these. Change-Id: Ia227f8b56e088c71210a748aeb2dedaba521c090 Reviewed-on: https://code.wireshark.org/review/30252 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-18cmake: rewrite FindGMODULE2.cmake and FindGTHREAD2.cmakePeter Wu2-83/+65
These modules currently set the library variables from PkgConfig directly, but these are not absolute paths. These modules are therefore not usable for static linking. Rewrite these files to follow a more familiar pattern: collect hints, find absolute header/library paths and let FPHSA handle the REQUIRED check. The old modules had some special cases for Apple, but I believe that these cases are no longer relevant. Change-Id: Idaef7e35b40a3ab4449d92ccb12a9febde962cf6 Reviewed-on: https://code.wireshark.org/review/30251 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-16Revert "cmake: fix version check for c-ares and gnuTLS"Joakim Karlsson2-16/+1
This reverts commit 189a7357e799c0faa5e36d4966f485b9b6d394e3. Change-Id: I6550703036a135866d7751da489c4974be79bb37 Reviewed-on: https://code.wireshark.org/review/30226 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-15cmake: fix version check for c-ares and gnuTLSJoakim Karlsson2-1/+16
Version requirement was already in place but not executed Change-Id: I9a163fae2b428cecd309f932f5ef87dd8db8c516 Reviewed-on: https://code.wireshark.org/review/30210 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-14Windows: Remove Cygwin warningGraham Bloice1-2/+0
As Cygwin is no longer required for Windows, remove the CMake warning if it isn't found Change-Id: I2fd44a00941d6b3f33666d8f6fcfa44a40224ad9 Reviewed-on: https://code.wireshark.org/review/30194 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-10-10Windows: Make our program details more consistent.Gerald Combs1-0/+26
Use a single template file for most of our program resources. Encode our resource files as UTF-8. Add resources to extcap/*.exe. Replace a regex with concatenation. Change-Id: I0ed49086618127ca4fdef69272f849d8f16e4dab Reviewed-on: https://code.wireshark.org/review/30088 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-10-08Put the Windows-specific system library settings in CMakeLists.txt.Guy Harris1-16/+0
We already do that for the macOS-specific system libraries; do it for the Windows-specific system libraries as well. Change-Id: I4646cbf5043406a9b6be70307b51df2fbe0329dd Reviewed-on: https://code.wireshark.org/review/30066 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-10-02We should only link executables with setargv.obj.Guy Harris1-3/+0
Libraries shouldn't be linked with it. See if this fixes the weird problems I'm having with mergecap - including, apparently, the mergecap from the buildbots - when run with wildcard arguments, terminating before it gets to main() (making it hard to try to debug bug 15151). Change-Id: Ie793b0ea8157186a121106636ac8b782457c09f5 Reviewed-on: https://code.wireshark.org/review/29985 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-10-01Add a systemd Journal Export extcap.Gerald Combs1-0/+41
Add an sdjournal extcap, which reads journal entries using the sd-journal API and dumps them as journal Export Format records. Change-Id: I17ccfa88ab5d053c16c869cd26e580d84022502e Reviewed-on: https://code.wireshark.org/review/29479 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-09CMake: Remove link test output lineJoão Valverde1-1/+0
The mode keyword STATUS needs to be capitalized, but this line is mostly redundant with the check_c_source_compiles_output(), so just remove it. Change-Id: I7f29915a7ab2c4b5681e0159773d9216643f8a9c Reviewed-on: https://code.wireshark.org/review/29524 Reviewed-by: João Valverde <j@v6e.pt>
2018-09-08CMake: Use upstream check compiler modules insteadJoão Valverde2-117/+0
CMake gives precedence to modules in CMAKE_MODULES_PATH (ours then). It already includes CheckCCompilerFlags and CheckCXXCompilerFlags, prefer uptream's instead, to benefit from bug fixes, etc. Change-Id: I063c43cf29f5837c445e8281262356660594c4e5 Reviewed-on: https://code.wireshark.org/review/29484 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-07cmake: optionally require Lua 5.1 or newerPeter Wu1-4/+2
doc/README.wslua reports support for 5.1 and 5.2 only. Even RHEL6 ships with Lua 5.1, so it makes not sense to maintain support for Lua 5.0. Change-Id: I34a8084c7fba19d631b90ce5d5a28198be6a7850 Reviewed-on: https://code.wireshark.org/review/29448 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-25CMake: Modernize config-file package supportJoão Valverde3-61/+0
A CMake config-file package provides support for downstreams using CMake and Wireshark libraries to easily configure the libwireshark dependency with: find_package(Wireshark CONFIG [REQUIRED]) target_link_libraries(foo epan) The FindWireshark.cmake file is no longer needed. See cmake-package(7) for more details on CMake's package system. Change-Id: Ie8af1d44417a99dd08d37959f7b2ffca88572ec2 Reviewed-on: https://code.wireshark.org/review/29208 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2018-08-23CMake: Clean up and homogenize plugin dir configurationJoão Valverde2-4/+5
Change-Id: If43c7b124afdf6471164675f8a0c55a76e998ea1 Reviewed-on: https://code.wireshark.org/review/29254 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>