Commit Graph

34 Commits

Author SHA1 Message Date
João Valverde 6c5e56f752 Windows: Add preliminary support for MSYS2
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-27 16:45:58 +00:00
Gerald Combs b86ec10ca4 CMake: Fixup our glibconfig.h discovery.
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-11 11:22:11 +00:00
Gerald Combs 6357f46bc6 Windows: Update GLib to 2.66.4.
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-10 03:48:28 +00:00
João Valverde 3a32757313 CMake: Fix FindGLIB2 for saner output
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-05-01 19:44:12 +00:00
Tomasz Moń 990e409273 CMake: Use glib debug dlls in Windows debug builds
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-09-28 10:24:34 +00:00
Peter Wu 8c26217548 CMake: bail out if minimum GLib version is not satisfied
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-19 17:29:11 +00:00
Gerald Combs acc96e5206 Windows: Start using a `vcpkg export` bundle.
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-03-18 22:22:44 +00:00
Peter Wu cfd79b4701 Windows: Upgrade GnuTLS to 1.6.3
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-31 08:10:56 +00:00
Peter Wu 811d5f7fac Drop JSON-GLib completely
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-20 05:04:11 +00:00
Peter Wu 54286eb09c FindGLIB2.cmake: workaround to make static linking work
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-18 20:06:16 +00:00
Pascal Quantin 2b65e9e74b Windows: upgrade GLib to 2.52.2
Change-Id: If54ec9f8c62d95697a5703ea24cf3ad7c2d6112c
Reviewed-on: https://code.wireshark.org/review/27048
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-20 10:46:06 +00:00
Peter Wu b887fd4919 CMake: fix build with json-glib with gold linker
JSON-GLIB depends on GObject. To avoid "undefined reference to
'g_object_unref'" with the gold linker, include gobject directly.
As the files are included with the GLib package, adjust FindGLIB2.cmake.

Change-Id: I007d30b89cc07d8746cee6b619832a722f086105
Fixes: v2.9.0rc0-201-g511c2e166a ("tshark: add -G elastic-mapping report.")
Reviewed-on: https://code.wireshark.org/review/27007
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-04-19 08:08:11 +00:00
Graham Bloice d6b3fcfeab CMake: Fix error from bab9abfb7d
Fix a cut and paste error

Change-Id: I28fa3644d5b7969c8009f5722f270c8fa566dd34
Reviewed-on: https://code.wireshark.org/review/24491
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2017-11-19 12:20:29 +00:00
Graham Bloice bab9abfb7d CMake: Clean up Windows build
Remove options that aren't supported on Windows
Don't use pkgconfig on Windows

Change-Id: I79718a1c43f56a9ec88f690490931b80b727dd68
Reviewed-on: https://code.wireshark.org/review/24481
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>
2017-11-18 20:58:31 +00:00
Gerald Combs b59c87f94a CMake: Move the search for libgcc_s to GLib.
Move the search for the libgcc_s_seh and _sjlj DLLs to the GLib directory.
That's the only place it currently exists on the 64-bit builder.

Change-Id: Icf55dacf061d9423e78cabeaf16aa539ccb619bb
Reviewed-on: https://code.wireshark.org/review/20162
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2017-02-17 20:27:03 +00:00
Gerald Combs a988253fef CMake: Copy libwireshark dependent DLLs to the target directory.
Add a "copy_cli_dlls" target which copies the DLLs required to run our
command line programs to the run directory.

Fix the spelling of "KERBEROS". Start filling in variables so that we
can populate config.nsh.

Change-Id: I9b3ed912dfbffecbf09f2893efa2c9d82e709521
Reviewed-on: https://code.wireshark.org/review/6513
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-13 19:25:10 +00:00
Peter Wu 9506909223 cmake: use pkg-config for resolving dependencies
Changes:
 * Fix glib2 search path.
 * Add pkg-config support to CAP, GEOIP, GNUTLS, LUA, PortAudio (API
   19), zlib, kerberos.
 * Add pkg-config support to libnl3, libnl2 and libnl1 (but tested only
   with libnl3).

This makes it easier to do 32-bit builds on 64-bit hosts by just setting
`PKG_CONFIG_LIBDIR`. Due to how HINTS work, it is still fragile though:
missing 32-bit libraries will cause a fallback to 64-bit libraries.

A future patch could check for `<PREFIX>_FOUND` and remove the manual
`find_path` and `find_library` hackery since the paths are already
known.

Change-Id: Ieb4fb74695c96afb1a4c70168e84abb1fa4612c6
Reviewed-on: https://code.wireshark.org/review/4292
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-01 08:14:34 +00:00
Joerg Mayer f847b92b08 It's so simple: If we require a package but provide alternative methods
of finding the package don't allow the first method to fail terminally.
Todo: Fix this in all other places as well.

Change-Id: I5a343fac33f6a5d6e50ff353d739459b2e36711a
Reviewed-on: https://code.wireshark.org/review/2300
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-17 14:29:52 +00:00
Joerg Mayer caf5e59001 Undo Graham's change to find the "correct" fix
Change-Id: Ifc368687da972231298ab5935d071a84edd3e56e
Reviewed-on: https://code.wireshark.org/review/2261
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-16 18:52:12 +00:00
Graham Bloice 561460160a Update CMake build for win32 to build QT again, and to find
GLib and GThread libs

Change-Id: If7e8ebc46f42389d174959303e13cde20687ae8a
Reviewed-on: https://code.wireshark.org/review/2010
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-08 12:13:35 +00:00
Alexis La Goutte 757aa33220 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\# \$Id\$/,+1 d') (start with dash)

Change-Id: Ia4b5a6c2302f6a531f6a86c1ec3a2f8205c8c2dd
Reviewed-on: https://code.wireshark.org/review/881
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:48:06 +00:00
Jörg Mayer 38b8e4ecb9 Graham Bloice
- Using gtk[23] is a hack. Implement a clean solution.

Me
- In the current setup, building Qt ONLY is not supported as
  lots of required support libraries are only found in gtk2 and
  gtk3. Print an error in that case.
- Small style changes (lowercasing, whitespace)

svn path=/trunk/; revision=53692
2013-12-01 10:34:01 +00:00
Jörg Mayer 5ec13cf1ba Remove a debug "printf"
svn path=/trunk/; revision=52358
2013-10-04 13:08:21 +00:00
Jörg Mayer 00ab245568 Replace the old version by a more modern one that only
tries to find glib2 and  not other stuff as well.
Not tested on OS X due to problems with my build environment.

svn path=/trunk/; revision=52356
2013-10-04 12:49:06 +00:00
Jörg Mayer d456079b7e Beginnings of win cmake support (not yet working), created by Graham Bloice,
some smaller changes by me.
- README.cmake
  Document how to (one day) run on Windows
- CMakeLists.txt
  Use MSVC compiler flags for MSVC instead of gcc flags
- FindWSWinLibs.cmake
  New: Creates HINTS for finding includes and libraries
  inside the Wireshark support library installation.
- FindXXX.cmake
  Make use of HINTS generated by FindWSWinLibs.cmake

This has not really been tested on Windows as my installation seems to have
automagically downloaded some fixes and is in an inconsistent state since.
Will probably need to reinstall.

svn path=/trunk/; revision=52194
2013-09-23 21:45:55 +00:00
Jörg Mayer 1f142a1404 Add call to FindPackageHandleStandardArgs
svn path=/trunk/; revision=38361
2011-08-05 12:25:54 +00:00
Jörg Mayer 46d4528e3d Attempt to properly fix the missing path information for glib libraries
svn path=/trunk/; revision=38360
2011-08-05 12:21:46 +00:00
Jörg Mayer 4bfd2dfdf1 - FindGLIB2.cmake updates from
http://www.opensync.org/browser/branches/3rd-party-cmake-modules/modules
  + split out FindGMODULE2.cmake
  + contains /sw/... by default
  + supposedly tested on OSX
- Disable pcre for cmake builds by default, gregex should be
  picked up automatically if glib2 is not too old.

Should you have trouble linking due to some libgmodule... stuff
undefined, please add "${GMODULE2_LIBRARIES}" after "${GLIB2_LIBRARIES}"
an report back.

svn path=/trunk/; revision=34248
2010-09-25 15:38:12 +00:00
Jörg Mayer 878d7246b8 - Add $Id: $ tags
- FindHtmlViewer.cmake: Try to add reading the name of the
  html viewer from the HTML_VIEWER environment variable (untested)

svn path=/trunk/; revision=30104
2009-09-23 19:40:25 +00:00
Stig Bjørlykke eead6ee717 Removed setting GLIB2_LIBRARIES to GLIB_LIBRARY, to improve build on OSX.
svn path=/trunk/; revision=30099
2009-09-23 18:08:16 +00:00
Stig Bjørlykke 7ef25b683b Search for includes and libs in /opt/local/ (MacPorts).
svn path=/trunk/; revision=29465
2009-08-18 14:37:25 +00:00
Jeff Morriss 86e10880c9 Remove iconv/libiconv checks from *NIX builds: GLIB-2 provides iconv replacements.
svn path=/trunk/; revision=25765
2008-07-18 12:11:08 +00:00
Jörg Mayer e8a5a41045 Parts of http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1179
Frederic Heem:
* More cmake system checks. It compiles dumpcap without running configure,

svn path=/trunk/; revision=19672
2006-10-24 17:39:32 +00:00
Jörg Mayer d6417e0842 cmake/
Add some more (hackish) tests.
	Add a LICENSE file until I find the time to add it to all
	files individually.

CMakeLists.txt
	Add some addiotional stuff regarding options.
	Add (non-working) code to generate config.h
	Handle GTK1 vs GTK2 and GLIB1 vs GLIB2

svn path=/trunk/; revision=19168
2006-09-06 22:28:19 +00:00