Sequoia 15.3.2 M3 chip.
brew install cmake didn't work for me, so I tried next:
brew install cmake
brew install pkg-config brew install cmake libgit2 bundle install