TARGET_FILE_DIR seems to be wrong when only MACOSX_BUNDLE_BUNDLE_NAME is set

TARGET_FILE_DIR seems to be using the default target name regardless of what MACOSX_BUNDLE_BUNDLE_NAME is set to. Setting OUTPUT_NAME in addition to MACOSX_BUNDLE_BUNDLE_NAME is a workaround, but seems redundant, or am I missing something?

Certainly sounds like a corner case that may have been missed. I suspect the test suite doesn’t cover this and that we’ll need a policy to fix it. Could you please file an issue?

Sure. https://gitlab.kitware.com/cmake/cmake/-/issues/25518