This seems to be a bug in CMake: https://gitlab.kitware.com/cmake/cmake/-/issues/20127.

Answer from magjac on askubuntu.com
Discussions

Can't find ZLIB (missing: ZLIB_LIBRARY) Ubuntu 20 CMake
The cmake checks, proceeds and stops, with an error ‘Could NOT find ZLIB’ I have issued the command, within Ubuntu version 20: export ZLIB_LIBRARY=/usr/local/zlib/lib export ZLIB_INCLUDE_DIR=/urs/local/zlib/include But still receive a not found a error. Someone said on the internet, there ... More on discourse.cmake.org
🌐 discourse.cmake.org
2
0
January 23, 2021
[question] Could NOT find ZLIB following the first tutorial
What is your question? Hi! I am tring to learn to use conan from beginnin, so I read the tutorial. My OS is win10, and I'm using VS2022. conan version is 2.0.5 Followed the tutorial I went to c... More on github.com
🌐 github.com
7
May 25, 2023
Cmake not finding zlib

To me this looks like CMake is not complaining about missing include (ZLIB_INCLUDE_DIR) but the zlib library itself...? Would installing the lib itself (zlib1g?) help?

More on reddit.com
🌐 r/linuxquestions
21
6
February 28, 2019
How do I fix problem of can NOT found ZLIB
I'm trying to complie a prj by ... found zlib. As Follow: I don't know why cmake can not find the lib and header file. How to fix that ? thanks. E:\Prj\rat_lite-master>..\cmake-3.18.2-win64-x64\bin\cmake.exe . CMake Error at E:/Prj/cmake-3.18.2-win64-x64/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message): Could NOT find ZLIB ... More on github.com
🌐 github.com
40
September 19, 2020
🌐
CMake Discourse
discourse.cmake.org › usage
Can't find ZLIB (missing: ZLIB_LIBRARY) Ubuntu 20 CMake - Usage - CMake Discourse
January 23, 2021 - The cmake checks, proceeds and stops, with an error ‘Could NOT find ZLIB’ I have issued the command, within Ubuntu version 20: export ZLIB_LIBRARY=/usr/local/zlib/lib export ZLIB_INCLUDE_DIR=/urs/local/zlib/include But still receive a not found a error. Someone said on the internet, there ...
🌐
GitHub
github.com › conan-io › conan › issues › 13963
[question] Could NOT find ZLIB following the first tutorial · Issue #13963 · conan-io/conan
May 25, 2023 - CMake Error at C:/Users/c.men/AppData/Local/CMAKE/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) Call Stack (most recent call first): C:/Users/c.men/AppData/Local/CMAKE/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE) C:/Users/c.men/AppData/Local/CMAKE/share/cmake-3.22/Modules/FindZLIB.cmake:120 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:4 (find_package) -- Configuring incomplete, errors occurred!
Author   conan-io
🌐
Reddit
reddit.com › r/linuxquestions › cmake not finding zlib
r/linuxquestions on Reddit: Cmake not finding zlib
February 28, 2019 -

Hello,

I'm trying to make a tool, but I'm getting this error:

CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.11")

I have installed zlib using

sudo apt install zlib1g-dev

, and zlib.h is located in /usr/include/, which was suggested in other threads with this problem, but it didn't help. What else can I do?

I've installed the same tool on another computer without problems, so it's not the tool.

🌐
GitHub
github.com › microsoft › vcpkg › issues › 13614
How do I fix problem of can NOT found ZLIB · Issue #13614 · microsoft/vcpkg
September 19, 2020 - The following packages are already installed: zlib[core]:x86-windows Package zlib:x86-windows is already installed Total elapsed time: 2.626 ms The package zlib is compatible with built-in CMake targets: find_package(ZLIB REQUIRED) target_link_libraries(main PRIVATE ZLIB::ZLIB) E:\Prj\vcpkg>vcpkg install zlib[core]:x64-windows Computing installation plan...
Author   microsoft
🌐
CMake Discourse
discourse.cmake.org › usage
Could NOT find ZLIB - Usage - CMake Discourse
November 26, 2021 - I am trying to set up PrizmSDK: ... laslo@MyTreasure-LinuxMint:~/Development/Prizm/mkg3a-master$ cmake . -- libpng icon loading support enabled. -- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandle...
Find elsewhere
🌐
CMake Discourse
discourse.cmake.org › usage
CMake Error, on MacOS, Could not find ZLIB (missing: ZLIB_LIBRARY) - Usage - CMake Discourse
July 27, 2023 - when configuring with cmake in order to compile azerothcore, I am receiving an CMake error where ZLIB can’t be located. This is what I’m getting: Lees-MBP-2:build leeelliott$ export OPENSSL_ROOT_DIR=$(brew --prefix ope…
🌐
GitHub
github.com › pnggroup › libpng › issues › 435
Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) · Issue #435 · pnggroup/libpng
September 24, 2022 - set(ZLIB_ROOT "C:/Users/Soldy/Documents/WindowsAppProject/imgui-docking/examples/example_glfw_vulkan/zlib-master") set(ZLIB_INCLUDE_DIR "C:/Users/Soldy/Documents/WindowsAppProject/imgui-docking/examples/example_glfw_vulkan/zlib-master") PS C:\Users\Soldy\Documents\WindowsAppProject\imgui-docking\examples\example_glfw_vulkan\libpng-1.6.35> cmake . -DCMAKE_INSTALL_PREFIX=/path -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044. CMake Warning (dev) at CMakeLists.txt:55 (find_package): Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
Author   pnggroup
🌐
Bioinformatics Answers
biostars.org › p › 9503644
Could NOT find ZLIB while running cmake
December 29, 2021 - You can obtain zlib from https://www.zlib.net/ and compile it from source (Think it is ./configure --prefix <directory you have access>; make; make install).
🌐
GitHub
gist.github.com › davidcorbin › 0b13604900089b8fcb28
How to fix missing ZLIB_LIBRARY and ZLIB_INCLUDE_DIR cmake error on Windows · GitHub
Check Abvanced and ckeck if ZLIB_LIBRARY or ZLIB_INCLUDE_DIR have entries in the left column. If the entry is not a directory, replace whatever is in the right hand column with the directory you found in step 2 and append /bin to the end of ...
🌐
Hacker News
news.ycombinator.com › item
> -- Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.8") that li... | Hacker News
July 10, 2021 - that liklely means that the headers were found but not the .so. For instance maybe you have a stale zlib.h in /usr/local, but not zlib-dev installed (thus no libz.so) · You can use cmake's --debug-find first to have more info, and if that's not enough, --trace / --trace-expand ; for instance ...
🌐
Stack Overflow
stackoverflow.com › questions › 54923690 › could-not-find-zlib-missing-zlib-library-found-version-1-2-11
ubuntu 18.04 - Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.11") - Stack Overflow
February 28, 2019 - You can install zlib via sudo apt install zlib1g-dev. ... Sign up to request clarification or add additional context in comments. ... Find the answer to your question by asking.
🌐
GitHub
github.com › VowpalWabbit › vowpal_wabbit › issues › 2298
[Documentation Improvement] CMake error: Could not Find ZLIB error while using make · Issue #2298 · VowpalWabbit/vowpal_wabbit
February 28, 2020 - CMake error: Could not Find ZLIB error while using make After the use of make command (while configuring and building vw), CMake error propped up with the following message: CMake Error at /usr/sha...
Author   VowpalWabbit
🌐
NixOS Discourse
discourse.nixos.org › help
Cannot build my LLVM related project using CMake (ZLIB::ZLIB not found) - Help - NixOS Discourse
July 29, 2024 - I create a very simple C project using LLVM. Here is my flake.nix: { description = "A Nix-flake-based Python development environment"; inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; outputs = { self, nixpkgs }: let supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { pkgs = import nixpkgs { inherit system; }; }); in { devShells = forE...
🌐
Google Groups
groups.google.com › g › itksnap-users › c › v5v3V8i8bDI
Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR)
February 8, 2018 - CMake Error at C:/Program Files/CMake/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR) Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) C:/Program Files/CMake/share/cmake-3.10/Modules/FindZLIB.cmake:112 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMake/find_fltk_13.cmake:102 (FIND_PACKAGE) CMake/standalone.cmake:16 (INCLUDE) CMakeLists.txt:76 (INCLUDE)
🌐
Ogre Forums
forums.ogre3d.org › board index › user forums › help
Ogre1.9 building - CMake cannot find Zlib - Ogre Forums
+ freeimage + freetype + OpenGL + OpenGL 3+ + OpenGL ES 1.x + OpenGL ES 2.x + OpenGL ES 3.x + DirectX9 + DirectX11 + cg + boost + boost-thread + SDL2 ----------------------------------------------------------------------------- -- The following OPTIONAL packages could NOT be located on your system. -- Consider installing them to enable more features from this software. + zlib: Simple data compression library <http://www.zlib.net> + POCO: POCO framework <http://pocoproject.org/> + tbb: Threading Building Blocks <http://www.threadingbuildingblocks.org/> + GLSL Optimizer: GLSL Optimizer <http://g