Commit Graph

24 Commits

Author SHA1 Message Date
Gerald Combs 0af3174508 CMake: Updates for CMake 3.25 and later on Windows.
https://cmake.org/cmake/help/latest/release/3.25.html says:

"On Windows, when targeting the MSVC ABI, the find_library() command now
accepts .a file names after first considering .lib. This is symmetric
with existing behavior when targeting the GNU ABI, in which the command
accepts .lib file names after first considering .a."

If "MSVC" is defined, only search for libsmi-2. This keeps us from finding
libsmi.a. Set NO_SYSTEM_ENVIRONMENT_PATH when we're searching for zlib. This
keeps us from finding Strawberry Perl's version.

Some SpanDSP builds link with LibTIFF, but our Windows version doesn't.
2022-11-28 19:15:48 +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
Guy Harris 5ae6a9bea6 Do FIND_PACKAGE_HANDLE_STANDARD_ARGS() before checking ZLIB_FOUND.
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-25 03:10:04 +00:00
Guy Harris c66994215b Don't look for zlib stuff if we didn't find zlib.
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-25 01:59:05 +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 ccf37e3905 CMake: fix failure to locate zlib (and possibly libssh)
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-23 15:43:38 +00:00
Guy Harris df21aa9025 Use cmake_push_check_state() and cmake_pop_check_state().
Change-Id: I70528d5f54f62a51bf6f438669cd70d5f0296ae5
Reviewed-on: https://code.wireshark.org/review/23435
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-09-08 11:34:29 +00:00
Guy Harris e61d2f6243 On UN*X, make sure we can find inflate() in libz.
For example, on at least some versions of Fedora, if you have a 64-bit
machine, have both the 32-bit and 64-bit versions of the run-time zlib
package installed, and have only the *32-bit* version of the zlib
development package installed, it'll find the header, and think it can
use zlib, and will use it in subsequent tests, but it'll try and link
64-bit test programs with the 32-bit library, causing those tests to
falsely fail.  Hilarity ensues.

Change-Id: Ic2536e8a652ef96e2a3923c1faa61f6c8c06bf58
Reviewed-on: https://code.wireshark.org/review/22417
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>
2017-06-27 07:48:58 +00:00
Guy Harris 9a1d16b553 Don't check for inflatePrime() on Windows.
On Windows, we build libz as part of the Wireshark build process, so we
don't necessarily *have* a libz library to search or inflatePrime() at
this point; the search fails on the buildbots, for example.

So, on Windows, we just assume we have a new enough version of libz, so
that it has inflatePrime().

Bug: 13850
Change-Id: Ied0909f4a591ff3312d83a2a2ed41e3cd12218e8
Reviewed-on: https://code.wireshark.org/review/22413
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-06-27 03:16:04 +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
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
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
Guy Harris 059423c27a Fix check for inflatePrime in zlib (ZLIB_LIBRARIES isn't set at that
point, you want ZLIB_LIBRARY).

svn path=/trunk/; revision=52532
2013-10-11 06:10:32 +00:00
Jörg Mayer 6c498c7420 Add Win support (and add a "hacked" case where the zlib
stuff has been compiled in place but not installed)

svn path=/trunk/; revision=52363
2013-10-04 15:42:23 +00:00
Jörg Mayer 8aada8637d As pointed out by Jakub Zawadzki:
While updating to the current cmake version of FindZLIB I missed
a Wireshark specific addition. Add it back.

svn path=/trunk/; revision=37626
2011-06-08 21:33:38 +00:00
Jörg Mayer fc59537249 Last patch removed $Id$ head line
svn path=/trunk/; revision=37620
2011-06-08 17:07:06 +00:00
Jörg Mayer a0116ff94f Copy over changes from cmake git HEAD.
svn path=/trunk/; revision=37619
2011-06-08 16:24:36 +00:00
Jeff Morriss b9b68170f0 Don't check for the existence of gzclearerr() any more.
Check for inflatePrime().

svn path=/trunk/; revision=36955
2011-04-29 18:29:26 +00:00
Jörg Mayer eb1fdd0f27 - Reset a few more variables used in FindXYZ scripts.
- README.cmake: small update.
- Set a variable before using it for installation.

svn path=/trunk/; revision=34274
2010-09-28 19:23:15 +00:00
Jörg Mayer e762964cd7 Add check for HAVE_GZCLEARERR.
svn path=/trunk/; revision=34204
2010-09-23 07:43:04 +00:00
Stig Bjørlykke d8c9646fc2 Set missing svn:keywords and svn:eol-style.
svn path=/trunk/; revision=33616
2010-07-22 12:18:36 +00:00
Jörg Mayer 76cee2c2a1 Commit 32350 replaced the self written FindZ.cmake by cmakes
FindZLIB.cmake. What it didn't do was do adapt the magic names
that are derived from the name of the FindXXX.cmake script.
Fix that. Also add $Id$ to the FindZLIB.cmake script.

svn path=/trunk/; revision=32899
2010-05-19 13:05:35 +00:00
Kovarththanan Rajaratnam 7133f6944d Sync ZLIB from CMake trunk
svn path=/trunk/; revision=32350
2010-04-01 10:10:48 +00:00