Merged requested to merge brad.king/cmake:xcode-extra-sources into master
MACOSX_BUNDLE targets we generate an
and add it to the sources presented to Xcode. Avoid mutating the
original target's list of sources to achieve this. Otherwise when we
generate the same target again (e.g. in a sub-project's Xcode file) it
will look different than the first time and possibly break invariants.
Fixes: #19114 (closed)