merge bitcoin#21363: Improve Qt static plugins/libs check code
merge bitcoin#21363: Improve Qt static plugins/libs check code

UdjinM6/dash,UdjinM6/dash,dashpay/dash,dashpay/dash,thelazier/dash,thelazier/dash,thelazier/dash,dashpay/dash,dashpay/dash,dashpay/dash,UdjinM6/dash,thelazier/dash,UdjinM6/dash,thelazier/dash,UdjinM6/dash