Ninja Multi-Config: Fix dependencies of custom commands
a9fd3a10 addressed the scenario where the depending target is a utility target, but not the scenario where the dependent target is a utility target. Account for this scenario.
Also add a Qt-specific test case.
Fixes: #21118 (closed)
Backport: release
Edited by Kyle Edwards