aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
AgeCommit message (Collapse)AuthorFilesLines
2021-10-13CMake: Try to make our man page builds faster.Gerald Combs1-4/+10
Depend on our generator targets instead of the generated files, which allows parallel builds outside of Ninja. Don't reserve JRE memory when building HTML and man page targets. This reduces the "docs" target build time on my Windows VM here from over two minutes to under one.
2021-10-01Docs+Packaging: Convert our man pages to Asciidoctor.Gerald Combs2-90/+29
Convert doc/*.pod to Asciidoctor. This: * Means we use the same markup for our man pages, the guides, and release notes. * Lets us add versions to our man pages. * Gives us more formatting options, e.g. AsciiDoc supports `commands`, nested lists and makes it easy to include version information. The manpage backend doesn't seem to support tables very well, unfortunately. Convert our CMake configuration to produce *roff and html man pages using Asciidoctor. Add a "manarg" block macro which makes our synopses wrap correctly. Similar to the release notes, guides, and FAQ, if Asciidoctor isn't found the man pages won't be generated or installed. Move Asciidoctor to the list of package build dependencies in various places. This commit includes the conversion script (pod2adoc.py), which will be removed later. Line count sanity check: Man page .pod .adoc androiddump 260 280 asn2deb 93 105 capinfos 401 471 captype 54 55 ciscodump 241 269 dftest 42 42 dpauxmon 153 169 dumpcap 464 534 editcap 528 583 etwdump 136 156 extcap 157 181 idl2deb 91 103 idl2wrs 120 100 mergecap 206 207 mmdbresolve 75 75 randpkt 107 111 randpktdump 158 184 rawshark 558 610 reordercap 76 78 sdjournal 145 157 sshdump 272 302 text2pcap 274 312 tshark 2135 2360 udpdump 133 151 wireshark-filter 486 479 wireshark 2967 3420
2021-09-27Windows: Add preliminary support for MSYS2João Valverde1-3/+4
If we are using MSYS2 we use those packages to build Wireshark using MinGW-w64 and disable most or all of our win-setup.ps1 codepaths. Fix GLib configuration. Disable copying of DLLs with MSYS2. Some tests in the suite_capture test suite are failing with MSYS MINGW64. That particular set of tests is way too brittle regarding file system paths; more work is needed to improve that situation.
2021-09-23Add compatibility fix for Minizip dependencyJoão Valverde1-0/+7
2021-09-23Docs: Asciidoctor.js isn't yet suitable for our needs.Gerald Combs1-4/+2
Reverse the text added in cdd6f2ec80 and note that we can't yet use Asciidoctor.js to build our documentation. I'm not sure how I managed to miss this in my initial tests, but Asciidoctor.js is missing Docbook, PDF, and EPUB backends, and doesn't support Ruby macros.
2021-09-20CMake: Add Doxygen search hint for WindowsJoão Valverde1-0/+1
This is where chocolatey installs doxygen. > choco install doxygen.install
2021-09-18epan: Remove some extraneous #ifdefsJoão Valverde1-0/+2
If a macro identifier is not defined it evaluates to zero in an expression, so the outer #ifdef is unnecessary and should be avoided (the less the better). Add a missing CMake comment while here.
2021-08-31cmake: lemon: fix path to internal lemon toolAdrian Ratiu1-1/+1
Wireshark fails to build when cross-compiling on Gentoo/ChromeOS systems because the lemon command is not properly specified or included in PATH, failing with: /bin/sh: lemon: command not found The relevant excerpt from build.ninja is: COMMAND = cd ..._build/plugins/epan/mate && lemon -T.../tools/lemon/lempar.c -d. .../plugins/epan/mate/mate_grammar.lemon By specifying the full path to "lemon" we ensure it is always searched and found in the correct location.
2021-08-29Cmake: misplaced quote in epub asciidoctor_optsChuck Craft1-1/+1
Follow up to !3988
2021-08-27CMake: Use "'" instead of "’" in our guide filenames.Gerald Combs1-6/+7
Use an apostrophe instead of RIGHT SINGLE QUOTATION MARK in our PDF and EPUB filenames. Some programs (notably Okular) can't open filenames with extended characters, at least on Windows.
2021-08-10CMake: include CheckFunctionExists in FindKERBEROS.cmakePascal Quantin1-0/+1
2021-08-03Docs: Give the PDF and EPUB guides descriptive filenames.Gerald Combs1-9/+14
Use the document title for our PDF and EPUB filenames under the theory that "Wireshark User’s Guide.pdf" is more obvious than "user-guide.pdf".
2021-07-30Docs: Add epub targets for the guides.Gerald Combs1-0/+47
Add user_guide_epub and developer_guide_epub targets that generate EPUB versions of the User's Guide and Developer's Guide. Ping #17494.
2021-07-23CMake: Remove some unused definitionsJoão Valverde1-1/+1
2021-07-15packet-kerberos: implement PAC Ticket checksum verificationStefan Metzmacher1-0/+2
We use some private functions from MIT kerberos: - krb5_free_enc_tkt_part() - decode_krb5_enc_tkt_part() - encode_krb5_enc_tkt_part() but we already do that for krb5int_c_mandatory_cksumtype(), which is newer than the above functions. We use all of them only under HAVE_KRB5_PAC_VERIFY, so we don't seem to need additional configure tests. Signed-off-by: Stefan Metzmacher <metze@samba.org>
2021-07-14CMake: Fixup SpanDSP's TIFF includes.Gerald Combs1-0/+6
Add TIFF_INCLUDE_DIR to SPANDSP_INCLUDE_DIRS, but only if TIFF has been found. Ping #17477.
2021-06-23CMake+docs: Use Asciidoctor.js if it's available.Gerald Combs1-0/+4
Add the executables shipped by the Asciidoctor.js project to FindAsciidoctor.cmake, and update the Developer's Guide to match.
2021-06-22CMake: Mark our plugin include directories PRIVATE.Gerald Combs1-0/+2
Use target_include_directories to mark our local include directories PRIVATE, similar to what we do elsewhere.
2021-06-11CMake: Fixup our glibconfig.h discovery.Gerald Combs1-7/+10
On Windows, search for glibconfig.h in the vcpkg lib directory. Search for it in the directory that contains libglib-2.0 on other platforms. Avoid a side effect that caused us to search in `/lib` on non-Windows platforms. Don't add GLIB2_LIBRARY to the search path -- that contains the path to a file, not a directory.
2021-06-10Windows: Update GLib to 2.66.4.Gerald Combs3-37/+41
Upgrade our vcpkg bundle to one that includes GLib 2.66.4 and libxml2 2.9.10. Avoid running pkgconfig on Windows so that we don't find Strawberry Perl's headers.
2021-06-04Windows: Switch from HTML Help to plain HTML.Gerald Combs3-125/+0
Switch from HTML Help to plain HTML files. In the NSIS and WiX installers, place the help assets in a directory with a friendly name.
2021-05-25epan: Add SMI versionJoão Valverde1-0/+8
2021-04-10CMake: Add ENABLE_VLD option for MSVCTomasz Moń2-0/+65
Calling cmake with -DENABLE_VLD=ON when building with Visual Studio, results in debug configuration being linked to Visual Leak Detector. By default, Visual Leak Detector outputs the leak summary to Visual Studio debug window. When ENABLE_VLD is active, VLD is linked to all wireshark libraries and executables.
2021-03-29Merge the caputils/ and capchild/ directoriesJoão Valverde1-1/+1
The distinction between the different kinds of capture utility may not warrant a special subfolfer for each, and sometimes the distinction is not be clear or some functions could stradle multiple "categories" (like capture_ifinfo.[ch]). Simplify by having only a generic 'capture' subfolder. The separate CMake libraries are kept as a way to reuse object code efficiently.
2021-03-22Replace the Large File Support CMake stuff.Guy Harris5-198/+238
The existing stuff doesn't appear to work (I tried it on 32-bit Ubuntu 18.04, and it did *not* add any flags to the compilation, as it appeared not to conclude that they were necessary, even though they were). Pull in the stuff from libpcap, which *does* appear to work. (it does so in my 32-bit Ubuntu testing). This should fix #17301. While we're at it, fix cppcheck.sh so that it doesn't attempt to run cppcheck on files that have been deleted.
2021-01-07CMake: Reduce "Generating plugin.c" noise during the buildPeter Wu1-3/+5
With Ninja, the build is unnecessarily noisy: [21/81] Generating plugin.c Generated plugin.c for l16_mono. [22/81] Generating plugin.c Generated plugin.c for G711. Avoid writing `Generated plugin.c for G711` and generate a single line such as `Generating plugins/codecs/G711/plugin.c` instead. Do not write the absolute path to plugin.c, this should hopefully help with reproducible builds that are independent of the build directory.
2020-12-09Windows: upgrade libssh to 0.9.5Pascal Quantin1-5/+6
Closes #17065
2020-12-01Windows: Upgrade brotli, libmaxminddb, lz4, and snappy.Gerald Combs2-3/+3
Upgrade brotli to 1.0.9, libmaxminddb to 1.4.3, lz4 to 1.9.2, and snappy to 1.1.8.
2020-11-30wiretap: Convert ascend.y to Lemon.Gerald Combs1-60/+0
Convert wiretap/ascend.y.in from Bison/YACC to Lemon and rename it to wiretap/ascend_parser.lemon. Tighten up some of our scanning and parsing. Make the indentation in it and related files consistent. Aside from the recent IPv4 fragment offset changes, this produces identical output to the 3.4 branch for the Ascend trace files I have here. Remove the comment about supporting other commands. Another timeline might have an Ascend that successfully pivoted to DSL or 15625B+1D gigabit ISDN, but this one has neither. This was our last/only Bison/YACC file, so remove Bison/YACC as a development and packaging dependency and remove references to it from the documentation.
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>