I can't see any reason for this to have been necessary in CI in the first place as we do CI runs for commits on a branch, not for a detached head.
Despite that, I've left it in the Linux and Android scripts as we don't suggest anyone runs those on their own machines.
The homebrew package should add qmake to the path, and qmake knows where Qt is.
If this works for brew, it should work for not-brew, too.
This *might* give a trailing /lib on the path CMake sees, but CMake implicitly tries adding a /lib suffix to paths in CMAKE_PREFIX_PATH, so this shouldn't make a difference to anything.