It is desired to find Zlib as most personal computers (laptops, workstations) have a new-enough Zlib, and Linux distributions in general like Debian likewise have new-enough Zlib.
To avoid the issue with find_package(ZLIB) not checking for adler32_combine() and declaring imported target ZLIB::ZLIB, we instead search for the same Zlib binary file names as find_package(ZLIB) but run an adler32_combine quick check before declaring ZLIB::ZLIB.
It is desired to find Zlib as most personal computers (laptops, workstations) have a new-enough Zlib, and Linux distributions in general like Debian likewise have new-enough Zlib.
To avoid the issue with
find_package(ZLIB)
not checking foradler32_combine()
and declaring imported targetZLIB::ZLIB
, we instead search for the same Zlib binary file names as find_package(ZLIB) but run an adler32_combine quick check before declaring ZLIB::ZLIB.