Building on macOS: Could not find a package configuration file provided by "Qt5WebEngine"

Since quite a while, I’ve been unable to build supercollider on macOS (Catalina). I’ve checked:

  • updated QT5 via homebrew

  • made a fresh build folder

  • checked if the paths exist:

cd "$(brew --prefix qt@5)"
find . -iname "*Qt5WebEngineConfig.cmake*"
  • tried various cmake arguments:
 cmake  ..
 cmake -DCMAKE_PREFIX_PATH=`brew --prefix qt5`  ..
 cmake -G Xcode -DCMAKE_PREFIX_PATH=`brew --prefix qt5`  ..

The error persists:

CMake Error at /opt/local/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5WebEngine" with
  any of the following names:

    Qt5WebEngineConfig.cmake
    qt5webengine-config.cmake

  Add the installation prefix of "Qt5WebEngine" to CMAKE_PREFIX_PATH or set
  "Qt5WebEngine_DIR" to a directory containing one of the above files.  If
  "Qt5WebEngine" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  QtCollider/CMakeLists.txt:30 (find_package)
  lang/CMakeLists.txt:184 (include)

This looks similar to https://github.com/supercollider/supercollider/issues/5584 (but that one is M1 related, where there is no web engine installed by homebrew – on my system, the web engine does exist).