cmake 4.0 breaks the build pipeline because of the removed compatibility with <= v3.5 (https://cmake.org/cmake/help/latest/release/4.0.html). Won't work on this because the long-term goal is to port the project to some language that has a sane build system (ie. not cmake).
Use cmake < 4.0 to compile from source or an alternative install method (check readme).