FindZLIB¶
Find the native ZLIB includes and library.
Imported Targets¶
Added in version 3.1.
This module defines IMPORTED target ZLIB::ZLIB, if
ZLIB has been found.
Result Variables¶
This module defines the following variables:
ZLIB_INCLUDE_DIRSwhere to find zlib.h, etc.
ZLIB_LIBRARIESList of libraries when using zlib.
ZLIB_FOUNDTrue if zlib found.
ZLIB_VERSIONAdded in version 3.26: the version of Zlib found.
See also legacy variable
ZLIB_VERSION_STRING.
Added in version 3.4: Debug and Release variants are found separately.
Legacy Variables¶
The following variables are provided for backward compatibility:
ZLIB_VERSION_MAJORThe major version of zlib.
Changed in version 3.26: Superseded by
ZLIB_VERSION.ZLIB_VERSION_MINORThe minor version of zlib.
Changed in version 3.26: Superseded by
ZLIB_VERSION.ZLIB_VERSION_PATCHThe patch version of zlib.
Changed in version 3.26: Superseded by
ZLIB_VERSION.ZLIB_VERSION_TWEAKThe tweak version of zlib.
Changed in version 3.26: Superseded by
ZLIB_VERSION.ZLIB_VERSION_STRINGThe version of zlib found (x.y.z)
Changed in version 3.26: Superseded by
ZLIB_VERSION.ZLIB_MAJOR_VERSIONThe major version of zlib. Superseded by
ZLIB_VERSION_MAJOR.ZLIB_MINOR_VERSIONThe minor version of zlib. Superseded by
ZLIB_VERSION_MINOR.ZLIB_PATCH_VERSIONThe patch version of zlib. Superseded by
ZLIB_VERSION_PATCH.
Hints¶
A user may set ZLIB_ROOT to a zlib installation root to tell this
module where to look.
Added in version 3.24: Set ZLIB_USE_STATIC_LIBS to ON to look for static libraries.
Default is OFF.