Commit Graph

319 Commits

Author SHA1 Message Date
Michael Mann c34996f970 Create a Wix Installer
This is intended to replace the NSIS installer for Windows.
It does not include installing WinPcap or USBPcap.  From the research I've done, it seems to make more sense to "bundle" them with Wix ("wrapper" installer that would include Wireshark, WinPcap and USBPcap installers together)

TODO:
1. Customize installer with Wireshark graphics
2. Better handling flexibility of installing VC CRT Merge module (need build script to provide appropriate macros).  Something like (or modifying existing) FindMSVC_REDIST.cmake.
3. Use Wireshark UpgradeProductCode for install/uninstall. Previous NSIS installer did not have an upgrade code, so there are some backwards compatibility concerns.
4. Uninstall considerations (removing whole directories - plugins, configuration profiles?).  NSIS needed to do more things "manually" than Wix does by default.  Need to merge as best as possible to handle backwards compatibility.

Many thanks to Brian Pratt for all the Wix help.

Change-Id: Ib50780214fc7707ba2a46fd96ba8797a1763fa0c
Reviewed-on: https://code.wireshark.org/review/14858
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-11 13:09:17 +00:00
Peter Wu 27646e1cb4 cmake: fix GTK3 detection via pkg-config
Put QUIET before the module name, otherwise FindPkgConfig tries to
locate a module named QUIET. This fixes a build failure that complains
about missing pango/pango.h.

Tested with GTK 3.20, CMake 3.5.2 on Arch Linux.

Change-Id: I76e487d0f4b7f9fbac4105521c349b392b680923
Reviewed-on: https://code.wireshark.org/review/15314
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-05-09 20:01:20 +00:00
Graham Bloice 2e23b506c7 Add checkAPI calls to CMake.
This generates a top level target, checkAPI, that is
excluded from the ALL build target, so must be run separately.

On Windows using a Visual Studio generator, call
msbuild /p:Configuration=RelWithDebInfo checkAPI.vcxproj

Change-Id: I44a57c564dcfc75499463b942436f4b920a82478
Reviewed-on: https://code.wireshark.org/review/14873
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-05-02 12:01:24 +00:00
Pascal Quantin ae316e2d88 Compile sshdump and ciscodump for Windows
Use libSSH 0.7.2 compiled with MinGW(32|64) and linked with zlib and gcrypt support

Change-Id: I7c17d1ba3dd1890e2f83c119f5ea851834807e43
Reviewed-on: https://code.wireshark.org/review/12117
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-25 07:22:28 +00:00
João Valverde ed6eecd79e [GTK] Check for xdg-open at run time
Remove HTML_VIEWER compile-time setting.

If xdg-open doesn't exist use user web browser preference as fallback.

Change-Id: I3b4a4a1a36b0192d75f2c97595f37d0d88a0941e
Reviewed-on: https://code.wireshark.org/review/14805
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: João Valverde <j@v6e.pt>
2016-04-09 23:40:51 +00:00
Guy Harris 59816ef00c Make the Flex scanners and YACC parser in libraries reentrant.
master-branch libpcap now generates a reentrant Flex scanner and
Bison/Berkeley YACC parser for capture filter expressions, so it
requires versions of Flex and Bison/Berkeley YACC that support that.

We might as well do the same.  For libwiretap, it means we could
actually have multiple K12 text or Ascend/Lucent text files open at the
same time.  For libwireshark, it might not be as useful, as we only read
configuration files at startup (which should only happen once, in one
thread) or on demand (in which case, if we ever support multiple threads
running libwireshark, we'd need a mutex to ensure that only one file
reads it), but it's still the right thing to do.

We also require a version of Flex that can write out a header file, so
we change the runlex script to generate the header file ourselves. This
means we require a version of Flex new enough to support --header-file.

Clean up some other stuff encountered in the process.

Change-Id: Id23078c6acea549a52fc687779bb55d715b55c16
Reviewed-on: https://code.wireshark.org/review/14719
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-04-03 22:21:29 +00:00
Gerald Combs 1e41221f31 CMake: Find asn2wrs.py once.
Load LocatePythonModule and use it to find asn2wrs once instead of every
time we cal the ASN2WRS function. This reduces the cmake run time by
about 3 to 4 seconds here.

Change-Id: I85f7dcca0b5891c9b4b23a76d017f8e504d6af60
Reviewed-on: https://code.wireshark.org/review/14614
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-03-24 18:41:39 +00:00
João Valverde 7a1d3f67ac Remove ADNS support
Relevant mailing list message:

  https://www.wireshark.org/lists/wireshark-dev/201503/msg00007.html

Change-Id: I0cff6d4d64fb52a651bcf6b28c183e43653b1cc2
Reviewed-on: https://code.wireshark.org/review/14519
Reviewed-by: João Valverde <j@v6e.pt>
2016-03-21 19:32:00 +00:00
Graham Bloice 92db934c7c Fix CMake target FOLDER properties
Add FOLDER properties to targets to clean up the presentation
in Visual Studio.

Change-Id: I35a175175db055443572c58a069879061fdcf0a3
Reviewed-on: https://code.wireshark.org/review/14528
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-03-20 14:03:12 +00:00
Gerald Combs a183726370 DocBook: Don't require xmllint.
Remove dependencies on xmllint. We don't write DocBook by hand any more
and we haven't used it in a long time in the CMake builds.

Change-Id: Ic07f03b00c4554c058eece0462b0925d565b6da1
Reviewed-on: https://code.wireshark.org/review/14506
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-03-18 23:26:51 +00:00
Gerald Combs ea42011e26 Add missing hints.
Change-Id: I49ee3080339e75e69e96e97c2a9069136772e3a0
Reviewed-on: https://code.wireshark.org/review/14296
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-03-02 18:57:31 +00:00
Gerald Combs 429c840fc9 Add Fop 2.1 to FindFOP.cmake.
Change-Id: I3d3bb3e6ae5cefb4bc439b922d228cb202f4f446
Reviewed-on: https://code.wireshark.org/review/14292
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-03-02 18:03:00 +00:00
Peter Wu d544ecd0ec cmake: fix parallel docbook build
Let targets depend on the generate_developer-guide.xml target instead of
the developer-guide.xml output file.

Change-Id: I66106ad69c9baedbd58a008b4dbbbf93b787c2c2
Reviewed-on: https://code.wireshark.org/review/14156
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-26 19:52:09 +00:00
Peter Wu 8d256d26d3 cmake: fix docbook dependency
After changing an asciidoc source file, the html files were not rebuilt
via 'ninja developer_guides'. It turns out that the
developer_guide_docbook target has an order-only dependency on
developer-guide.xml (and not the developer-guide.xml dependencies).

Fix this by adding an explicit dependency on the generated .xml file.

Change-Id: I4bdc0ebca8909caaab9cc0797cc35cc6260bfe43
Reviewed-on: https://code.wireshark.org/review/14065
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-02-23 23:31:11 +00:00
David Morsberger da5594744e Get Clang to report errors for unused vs. unknown linker flags
Change-Id: Iabe497d88239c1e15d7ef6d44c6fca79c8be2d1c
Reviewed-on: https://code.wireshark.org/review/13569
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-28 02:44:14 +00:00
Guy Harris 8049df7943 Get Clang to report errors for unknown linker flags.
Change-Id: Id8e77b6b521acc1ba684823211d6c09d0e5c111c
Reviewed-on: https://code.wireshark.org/review/13566
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-27 18:27:55 +00:00
Guy Harris 54e3b32027 Don't treat Visual Studio specially for linker flags.
Have CHECK_C_LINKER_FLAG pass /WX to the linker if we're using MSVC, to
force the link to fail if the linker doesn't recognize the flag.

Add flags to WIRESHARK_LD_FLAGS even with MSVC; let CHECK_C_LINKER_FLAG
figure out whether the flag should be used.

While we're at it, fix CHECK_C_LINKER_FLAG to save and restore
CMAKE_REQUIRED_LIBRARIES.

Change-Id: I7f73b4cc3a28eb14e46c2e1e9ad69f5303754f01
Reviewed-on: https://code.wireshark.org/review/13558
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-27 05:24:50 +00:00
Guy Harris dc91ac5241 Make CHECK_C_LINKER_FLAG work with, at least, the Xcode generator.
As per a suggestion from a Kitware person in bug 0015934:

	https://cmake.org/Bug/view.php?id=15934

We also don't need to check whether the resulting code *runs* -
check_c_source_compiles not only compiles, it links as well.

Change-Id: Ied09b9da7c88ac46f14df14f6a6260037abdbef4
Reviewed-on: https://code.wireshark.org/review/13556
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-27 00:55:07 +00:00
Graham Bloice 619a7a35b7 Docbook: Revert part of change 13160
Remove the file dependency on the xml file as this causes
build failures due to parallel building.

There is still an issue with the build of *.hhp if the corresponding
*.xml file is rebuilt.

Change-Id: I738c687be50daebcf93576be8a43dbb6475f4fc8
Reviewed-on: https://code.wireshark.org/review/13217
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-01-12 08:49:59 +00:00
Graham Bloice 25bfbaa0cf CMake: Fix docbook dependencies
unset accumulator variables after use so that successive uses are
not carried forward.
add MAIN_DEPENDENCY for chm generation so that it is correctly
rebuilt when the sources change.

Change-Id: I3b0c47a775f398346cc3a3bbd39d4fab2b0ec000
Reviewed-on: https://code.wireshark.org/review/13160
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-01-10 07:04:11 +00:00
Guy Harris ba3aa03dcf Move more capture device handling to the caputils library.
Move the code to open capture devices and get properties of capture
devices there, joining the code to get a list of capture devices.

This lets us do a better job of handling pcap_create() in WinPcap,
including handling both WinPcap with pcap_create() and WinPcap without
pcap_create() at run time, just in case somebody tries using WinPcap 3.x
with a Wireshark built with WinPcap 4.x.

It also could make it easier to use libpcap/WinPcap directly in
Wireshark and TShark, if we have versions of libpcap/WinPcap that run
small helper utilities to do privileged functions, allowing programs
using them never to need elevated privileges themselves.  That might
make it easier to fix some issues with running TShark when not saving to
a file (we could avoid the file entirely) and with delays when stopping
a capture in Wireshark (Wireshark could stop writing to the file as soon
as you click the stop button, rather than letting dumpcap do so when the
signal gets to it).

It might also make it easier to handle future versions of
libpcap/WinPcap that support using pcap_create()/pcap_activate() for
remote captures, and other future extensions to libpcap/WinPcap.

Rename some XXX_linktype routines to XXX_datalink to indicate that they
work with DLT_ values rather than LINKTYPE_ values; future versions of
libpcap might use LINKTYPE_ values in newer APIs.

Check for pcap_create() on all platforms in CMake.

Change-Id: Ia12e1692c96ec945c07a135d246958771a29c817
Reviewed-on: https://code.wireshark.org/review/13062
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-07 04:38:39 +00:00
Graham Bloice 40a21c0236 Build: On Windows, ensure we have found Cygwin bash
git can be installed (or the path manually set) so that the msys
unix utilities supplied with git (expecially bash) are on the path
and then picked up by CMake.  These utilities are not compatible with
the build and will fail.

This change checks the output of the --version option to the found
executable and ensures "cygwin" is found in the result.  If not found
a FATAL_ERROR message is issued and the CMake generation is stopped.

Change-Id: I0eca014ae194862abbc8dee56d347526691e72cb
Reviewed-on: https://code.wireshark.org/review/13008
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2016-01-02 22:59:03 +00:00
Gerald Combs 6084c21d74 CPack: Fixup plugin paths on Windows.
Fix the per-configuration output directories for plugins. Fixes the following
when running CPack:

----
CMake Error at C:/Development/wireshark/cmbuild/plugins/docsis/cmake_install.cmake:32 (file):
  file INSTALL cannot find
  "C:/Development/wireshark/cmbuild/run/$(Configuration)/plugins/docsis.dll".
Call Stack (most recent call first):
  C:/Development/wireshark/cmbuild/cmake_install.cmake:329 (include)
----

Change-Id: I8d97722cc0d54e9ef26aeaeb311522e161c428e5
Reviewed-on: https://code.wireshark.org/review/12953
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-12-30 22:40:00 +00:00
Gerald Combs 42333aa353 CMake+PortableApps: Include the VC runtime (second try).
Move the code that finds the Visual C++ redistributable DLLs to its
own module. Run it before we create our NSIS and PortableApps targets.
Add a PortableApps target that copies the redistributable

This reverts commit 403fa9fbe0cdba3f443ec4674cda40092525ffe4.

Bug: 11800
Change-Id: I081d8fd3f5f37dd590659ca8f2bd309642a9a9df
Reviewed-on: https://code.wireshark.org/review/12431
Reviewed-by: Gerald Combs <gerald@wireshark.org>
(cherry picked from commit 5b580834aeeee8477039bc099c49c21aeeb3b71f)
Reviewed-on: https://code.wireshark.org/review/12432
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
2015-12-04 22:32:32 +00:00
Peter Wu a198f47c06 cmake: add asn1 target, avoid unnecessary rebuilds
Add an "asn1" build target that rebuilds all ASN.1 dissectors.

Do not always generate the ASN.1 dissector when invoking the
"generate_dissector-PROTO" target. Use a special "packet-PROTO-stamp"
file to detect whether the dissector is out of date.

This indirection is needed because cmake removes output files from
add_custom_command in the clean target, but we would like to keep the
generated packet-PROTO.c files.

Make all EXTRA_CNF and EXPORT_DEPENDS point to absolute paths for
generated exported configs (PROTO-exp.cnf). This is done by automake too
and is needed for proper dependency tracking. Example: when h225.cnf is
updated, h225-exp.cnf needs to be generated. That is the purpose of the
"generate-h225-exp.cnf" target. Now h235 (and other) dissectors need to
be regenerated as well because the h225-exp.cnf is updated. This is why
there is a separate add_custom_command and add_custom_target.

Change-Id: I8cfc1f8f43cea595267b21eae30b4548f3407c0b
Reviewed-on: https://code.wireshark.org/review/12080
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-26 12:37:21 +00:00
Peter Wu 5afbf7e0e5 cmake: fix "multiple rules generate abi-descriptor.template" warning
Fixes warning with "cmake -GNinja && ninja":

    ninja: warning: multiple rules generate
    /tmp/wireshark/abi-descriptor.template. builds involving this target
    will not be correct; continuing anyway [-w dupbuild=warn]

Change-Id: I82ed3aefd32852e6a98060c1a175df855062531d
Reviewed-on: https://code.wireshark.org/review/12009
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-11-23 17:22:44 +00:00
Dario Lombardo d6da95231e extcap: add sshdump.
sshdump is an extcap module that allows dumping from a remote host using an ssh connection.
It goes with the existing extcap plugin interface.

Change-Id: I8987614fdd817b8173a50130812bc643a4833bca
Reviewed-on: https://code.wireshark.org/review/11402
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-19 15:29:18 +00:00
Gerald Combs 9a7973770e CMake: Add "C:/tools/cygwin" to FindCygwin.cmake.
Add C:\tools\cygwin to the list of search paths in FindCygwin.cmake.
This matches the behavior of config.nmake and is where Chocolatey
installs Cygwin.

Change-Id: I87a3cd64aae410b9c9abdc87c56d29aa3c4d5946
Reviewed-on: https://code.wireshark.org/review/11885
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-17 01:37:00 +00:00
Peter Wu 67ad1de0d0 FindLUA.cmake: reject version 5.3
Lua 5.3 could still be used when located at /usr/include/lua.h. Detect
and reject it in that case.

Rename LUA_VERSION to LUA_VERSION_NUM to avoid a conflict with
pkg-config (which uses a different version format). Ensure that the
regex matches a number only.

Bug: 11706
Change-Id: Idb7e3e1a8d9c6e4ab9ab1816c4dedea7de9dde8e
Reviewed-on: https://code.wireshark.org/review/11836
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-11-15 20:15:41 +00:00
Pascal Quantin 654d4abf71 CMake: add our own FindCygwin module
The one from official CMake (3.3.2) does not look for the default 64bits installation path. Let's add it.
Also add a WIRESHARK_CYGWIN_INSTALL_PATH environment variable allowing to force it.
For reference, registry based detection fails to detect a 64bits installation because it gets redirected to the Wow6432 node.

Change-Id: If3172494e3ab232e094389b493e6b67023662ae5
Reviewed-on: https://code.wireshark.org/review/11769
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-11-13 14:24:05 +00:00
Guy Harris 6375df2da4 Put a newline at the end of the file.
Change-Id: Ic04e9a4afdceb1e36ad8367dd0d7bf6bd0674844
Reviewed-on: https://code.wireshark.org/review/11514
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-03 01:46:41 +00:00
Gerald Combs 5c5cc228fc Revert the last two CMake changes.
get_filename_component returns "/regstry" if the query is unsuccessful.
We'll have to add a check for that if we query "Add Paths".

Revert "CMake: Pass ABSOLUTE to get_filename_component."

This reverts commit 4c03f4be00.

Revert "CMake: Look for Python using the "App Paths" key."

This reverts commit 6d1b6cd39d.

Change-Id: Ida17608467fa3652f4219e4eaf01edfa48120b1d
Reviewed-on: https://code.wireshark.org/review/11512
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-03 01:35:28 +00:00
Gerald Combs 4c03f4be00 CMake: Pass ABSOLUTE to get_filename_component.
Change-Id: Iecfc4aabe332cac930a7fa5bb6e342a55e7bc7b3
Reviewed-on: https://code.wireshark.org/review/11510
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-03 01:09:23 +00:00
Gerald Combs 6d1b6cd39d CMake: Look for Python using the "App Paths" key.
Query HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\Python.exe
and HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\Python.exe
first before trying other methods.

Change-Id: I83f54f6833149c68f1626c3c17f25ffe54d8ea5d
Reviewed-on: https://code.wireshark.org/review/11506
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-11-03 00:37:29 +00:00
Peter Wu fe1ab42f16 Require GnuTLS 2.12.0, add cmake version detection
Since v2.1.0rc0-17-g877fd03 and v2.0.0rc0-23-g263ff53 ("ssl-utils:
load RSA keys based on their modulus+exponent"), GnuTLS 2.12.0 is
needed.

Add a version check to cmake as well, tested on CentOS6 (with
pkg-config check disabled to verify the code path). Note that RHEL6
has GnuTLS 2.8.5 and thus SSL decryption with a RSA private key is no
longer supported on that version.

Change-Id: I99fdfe6790107f48629dd435794fe8880263063d
Reviewed-on: https://code.wireshark.org/review/11044
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-10-25 14:05:07 +00:00
Peter Wu 82ec0bb0fc Require libgcrypt 1.4.2, add cmake version detection
libgcrypt 1.4.2 is required since since v1.11.0-rc1-2787-g23f9100
("Really add support for AEAD ciphers (GCM)") due to the use of
gcry_cipher_setctr. Bump the version in configure.ac too.

Add version check for gcrypt to cmake. Tested with CentOS 6 (cmake
2.8.12.2, libgcrypt 1.4.5).

Change-Id: I93c3ed902a764d9d14675779e866230d073c96d5
Reviewed-on: https://code.wireshark.org/review/11043
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-10-20 03:28:55 +00:00
Gerald Combs 7682ae4887 Keep CMake from finding Cygwin's Python.
Try to find Python and set PYTHON_EXECUTABLE on Windows via the registry
prior to calling FindPythonInterp. This works around a bug in CMake that
prefers Cygwin's Python, which is a symlink, which by default is a text
file that contains a Cygwin-specific cookie, which is therefore useless
outside of Cygwin.

This is avoids the need to pass -DPYTHON_EXECUTABLE=... to CMake.

Change-Id: Ife37221b61d920682c20357b6d139a93067a5ad1
Reviewed-on: https://code.wireshark.org/review/11071
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-16 20:40:28 +00:00
Peter Wu 14085e043a Revert "Another message from Clang for unknown -f and -m flags."
This reverts commit 5e5e2019ee.

This change was proposed in https://cmake.org/Bug/view.php?id=13194 to
catch some Clang warnings concerning invalid -m flags, but it is causing
legitimate breakage when setting CMAKE_C_FLAGS=-gsplit-dwarf.
CMakeFiles/CMakeError.log shows:

    /usr/bin/clang  -gsplit-dwarf -DC__W_VALID    CMakeFiles/cmTC_04cc8.dir/src.c.o  -o cmTC_04cc8 -rdynamic
    clang-3.7: warning: argument unused during compilation: '-gsplit-dwarf'

With the additional regex, basic checks (like -Wall but also -fPIE) are
incorrectly reported as unsupported. Follow upstreams action here and
remove it, it is still not present as of CMake 3.3.2.

Change-Id: I8a1e97b16c2bb929436cca669fdb42f33612c490
Reviewed-on: https://code.wireshark.org/review/10880
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-10-14 16:53:36 +00:00
Peter Wu 01f82ee84c cmake: fix kerberos library lookup, support Heimdal
A build with the gold linker broke with:

    run/libwireshark.so.0.0.0: error: undefined reference to 'krb5_c_decrypt'

Fix this my restructuring the FindKERBEROS module to use the libraries
found by pkg-config.

While at it, check for MIT and Heimdal instead of assuming MIT. Remove
HAVE_KEYTYPE_ARCFOUR_56 as this macro is not used.

Change-Id: Iab23d79bc3f25e9c0fd7203b6f050f875fb4a2b5
Reviewed-on: https://code.wireshark.org/review/10907
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2015-10-13 07:36:30 +00:00
Gerald Combs 81d8b7dcdc CMake: Don't clobber ZLIB_*.
On Windows we set a few (but not all) ZLIB_* variables, then depend on
FindZLIB to fill in the rest. Make sure FindZLIB doesn't unset everything
the first time we run CMake.

Bug: 11569
Change-Id: I199c83570c29343466b9ff63080b6a964dfd8d73
Reviewed-on: https://code.wireshark.org/review/10843
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-10-06 21:41:25 +00:00
Guy Harris 12c83d02cc Report an error if we don't find fop and are going to try to use it.
Change-Id: Ide5c43b797a2fa07c7d3c7f986d306a158d68c6b
Reviewed-on: https://code.wireshark.org/review/10840
Reviewed-by: Guy Harris <guy@alum.mit.edu>
(cherry picked from commit 6c45d217d9d4fbf2a4dbc17d0b92334e3bc93052)
Reviewed-on: https://code.wireshark.org/review/10841
2015-10-06 18:46:00 +00:00
Graham Bloice 1e8ad87d46 Cosmetic tidy up for the projects in the Visual Studio solution
Change-Id: Ie4ed28ee7e59def2e8a15433334988b4d0225d1d
Reviewed-on: https://code.wireshark.org/review/10675
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2015-09-28 20:26:20 +00:00
Gerald Combs 7f60878be1 Add FOP 2.0 to the search list.
Change-Id: Ifc462a69e28b875f05770c453b06689c69008c52
Reviewed-on: https://code.wireshark.org/review/10235
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-24 16:04:10 +00:00
Gerald Combs c4b93e9496 CMake: Fixup appending to WS_WIN_LIBS
In the world of CMake calling "set" with multiple values creates a
semicolon-separated list. For WS_WIN_LIBS we want a single string so we
need to call "set" with a single, quoted value.

Change-Id: I96c5085af58adfb97ce16195eb27cc8ddb612d6a
Reviewed-on: https://code.wireshark.org/review/10158
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-20 19:56:22 +00:00
Hadriel Kaplan ba69473c87 Link setargv.obj for Windows in CMake so mergecap works
Try it again.

Change-Id: I511dd3d7d70fa33e246085c8cb79925e92945ebc
Reviewed-on: https://code.wireshark.org/review/10148
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-20 12:49:41 +00:00
Hadriel Kaplan 3b5a1f257f Link setargv.obj for Windows in CMake so mergecap works
Mergecap needs setargv.obj in order to get wildcard support. This is linked
in nmake but not cmake.

Bug: 10354
Change-Id: Icccf6b36495ac4b376f651d689b4a1f9e2c6042d
Reviewed-on: https://code.wireshark.org/review/10143
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-08-20 03:33:29 +00:00
Gerald Combs c643cbfb81 Run abicheck commands at compile time.
The CMake dumpbabi targets collectively copy over 800 files. Do
that when when we build the actual targets instead of at configure
time. Hopefully this will speed up initial CMake runs.

Change-Id: I6e4d691e24c73ea05d638a0f897f570541c84e38
Reviewed-on: https://code.wireshark.org/review/10052
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-16 16:04:47 +00:00
Gerald Combs 394773ccae Switch the guides back to html output.
DocBook's xhtml5 stylesheet output didn't render correctly in Firefox.

This reverts commit dc09d18e8e.
This reverts commit 62e56ad92a.
This reverts commit 53a80334bc.

Change-Id: Iafcf18cfce25772146fc2e155728401fd105a44b
Reviewed-on: https://code.wireshark.org/review/9944
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-09 16:16:24 +00:00
Gerald Combs 0626e766cf CMake: Try to fix generated docbook dependencies.
Add custom {developer,user}_guide_docbook targets for docbook output. Make
sure the HTML, PDF, and CHM outputs depend on their associated docbook
target and not on the output .xml file. This keeps us from running a2x
instances in parallel.

Change-Id: I73b0db50ae92f62eb08ae284d498cdf2d697ac00
Reviewed-on: https://code.wireshark.org/review/9920
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-08 21:51:56 +00:00
Gerald Combs 62e56ad92a Make sure we use "*.html" in our chunked output.
Change-Id: Idb441084ec50ec336b7f514895aba799832e8f66
Reviewed-on: https://code.wireshark.org/review/9879
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-05 18:01:28 +00:00