# TARGET\_FILE\_DIR seems to be wrong when only MACOSX\_BUNDLE\_BUNDLE\_NAME is set

**URL:** <https://discourse.cmake.org/t/target-file-dir-seems-to-be-wrong-when-only-macosx-bundle-bundle-name-is-set/9670>\
**Category:** Code\
**Created:** [December 18, 2023, 4:47pm UTC](https://discourse.cmake.org/t/target-file-dir-seems-to-be-wrong-when-only-macosx-bundle-bundle-name-is-set/9670 "2023-12-18T16:47:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_Bonac](https://discourse.cmake.org/user_avatar/discourse.cmake.org/martin_bonac/32/4095_2.png) [@Martin\_Bonac](https://discourse.cmake.org/u/Martin_Bonac)\
**Post date:** [December 18, 2023, 4:47pm UTC](https://discourse.cmake.org/t/target-file-dir-seems-to-be-wrong-when-only-macosx-bundle-bundle-name-is-set/9670/1 "2023-12-18T16:47:52Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)\
**Post date:** [December 19, 2023, 4:00am UTC](https://discourse.cmake.org/t/target-file-dir-seems-to-be-wrong-when-only-macosx-bundle-bundle-name-is-set/9670/2 "2023-12-19T04:00:10Z")

</div>

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](https://gitlab.kitware.com/cmake/cmake/-/issues)?

---

<div class="post-metadata">

**Author:** ![Martin\_Bonac](https://discourse.cmake.org/user_avatar/discourse.cmake.org/martin_bonac/32/4095_2.png) [@Martin\_Bonac](https://discourse.cmake.org/u/Martin_Bonac)\
**Post date:** [December 19, 2023, 4:12am UTC](https://discourse.cmake.org/t/target-file-dir-seems-to-be-wrong-when-only-macosx-bundle-bundle-name-is-set/9670/3 "2023-12-19T04:12:34Z")

</div>

Sure. [https://gitlab.kitware.com/cmake/cmake/-/issues/25518](https://gitlab.kitware.com/cmake/cmake/-/issues/25518)
