aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindGLIB2.cmake
AgeCommit message (Collapse)AuthorFilesLines
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>
2019-09-28CMake: Use glib debug dlls in Windows debug buildsTomasz Moń1-38/+83
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-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-03-18Windows: Start using a `vcpkg export` bundle.Gerald Combs1-13/+34
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>
2018-12-31Windows: Upgrade GnuTLS to 1.6.3Peter Wu1-1/+4
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-11-20Drop JSON-GLib completelyPeter Wu1-20/+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-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-04-20Windows: upgrade GLib to 2.52.2Pascal Quantin1-6/+1
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-19CMake: fix build with json-glib with gold linkerPeter Wu1-1/+20
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>
2017-11-19CMake: Fix error from bab9abfb7d259e1daaf84776ed9d4d09e2469293Graham Bloice1-1/+0
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-18CMake: Clean up Windows buildGraham Bloice1-5/+8
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-02-17CMake: Move the search for libgcc_s to GLib.Gerald Combs1-0/+1
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>
2015-01-13CMake: Copy libwireshark dependent DLLs to the target directory.Gerald Combs1-10/+27
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>
2014-10-01cmake: use pkg-config for resolving dependenciesPeter Wu1-3/+3
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-06-17It's so simple: If we require a package but provide alternative methodsJoerg Mayer1-7/+4
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-16Undo Graham's change to find the "correct" fixJoerg Mayer1-6/+6
Change-Id: Ifc368687da972231298ab5935d071a84edd3e56e Reviewed-on: https://code.wireshark.org/review/2261 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-08Update CMake build for win32 to build QT again, and to findGraham Bloice1-6/+6
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-03-31Continue to remove $Id$ from top of fileAlexis La Goutte1-2/+0
(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>
2013-12-01Graham BloiceJörg Mayer1-3/+11
- 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-10-04Remove a debug "printf"Jörg Mayer1-2/+0
svn path=/trunk/; revision=52358
2013-10-04Replace the old version by a more modern one that onlyJörg Mayer1-246/+100
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-09-23Beginnings of win cmake support (not yet working), created by Graham Bloice,Jörg Mayer1-0/+8
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
2011-08-05Add call to FindPackageHandleStandardArgsJörg Mayer1-0/+1
svn path=/trunk/; revision=38361
2011-08-05Attempt to properly fix the missing path information for glib librariesJörg Mayer1-106/+112
svn path=/trunk/; revision=38360
2010-09-25- FindGLIB2.cmake updates fromJörg Mayer1-173/+199
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
2009-09-23- Add $Id: $ tagsJörg Mayer1-1/+4
- 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-23Removed setting GLIB2_LIBRARIES to GLIB_LIBRARY, to improve build on OSX.Stig Bjørlykke1-3/+0
svn path=/trunk/; revision=30099
2009-08-18Search for includes and libs in /opt/local/ (MacPorts).Stig Bjørlykke1-0/+1
svn path=/trunk/; revision=29465
2008-07-18Remove iconv/libiconv checks from *NIX builds: GLIB-2 provides iconv ↵Jeff Morriss1-33/+0
replacements. svn path=/trunk/; revision=25765
2006-10-24Parts of http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1179Jörg Mayer1-98/+215
Frederic Heem: * More cmake system checks. It compiles dumpcap without running configure, svn path=/trunk/; revision=19672
2006-09-06cmake/Jörg Mayer1-0/+127
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