[3.28.0-rc | Regression?] vcpkg error: building zlib:x64-windows failed with: BUILD_FAILED

Got BUILD_FAILED error message trying to install zlib with vcpkg and CMake 3.28.0-rc1 or CMake 3.28.0-rc2.

For more details see [zlib] build failure with vcpkg · Issue #34597 · microsoft/vcpkg · GitHub (Resolved by using CMake 3.27.7)

I think there is a regression/incompatible change somewhere because it works with CMake 3.27.7.

The problem here ist that vcpkg CI updated to 3.28.0-rc2 is not able to reproduce the observed issue and I was also not able to reproduce the issue on my machine. So something is going on here since there are at least two persons reporting the issue.

Please see comment at github:

I was able to bisect the commit chain and reproduce the issue.

For reference, this is now tracked as CMake Issue 25355.