Autogen: Fix multi-config generated file issue

The default config was an empty string when a `multi-config`
generator is used. An if check was added for those situations.
If a source file has a specific config configuration,
it is used with `$<CONFIG>` in the `multi-config` generator usage.

Fixes: #24848
3 files changed