This is a regression introduced by the fix for
It has been observed when building PySide2 against a macOS qt framework build, which uses the Qt5UiTools package.
The Qt5UiTools CMake package reads the corresponding .prl file to get its static library dependencies. The dependencies include not only system libraries, but also Qt libraries via entries like "-framework;QtWidgets;-framework;QtGui".
_qt5_UiTools_process_prl_file tries to call find_library on QtWidgets when handling framework options, fails, and thus the whole CMake configuration fails.