zlib icon indicating copy to clipboard operation
zlib copied to clipboard

Missing zlib.h in CMake built directory

Open donmor opened this issue 2 years ago • 1 comments

I created build directory outsides the source dir and executed cmake /path/to/zlib then make zlibstatic there. Then I found there's no zlib.h in the build directory.

donmor avatar Dec 19 '23 14:12 donmor

hi donmor,

This is expected behavior, the headers don't need to be there after build, only after installing the library. So, if you do:

cd /path/to/zlib
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install/zlib
cmake --build .
cmake --install .

then /path/to/install/zlib will have the proper folder structure with both binary and headers.

witte avatar Sep 30 '24 19:09 witte

See https://github.com/madler/zlib/pull/1027 .

madler avatar Feb 02 '25 21:02 madler