# Help / Feature Request: TARGET\_BUNDLE\_DIR\_NAME

**URL:** <https://discourse.cmake.org/t/help-feature-request-target-bundle-dir-name/5374>\
**Category:** Code\
**Created:** [April 5, 2022, 12:30pm UTC](https://discourse.cmake.org/t/help-feature-request-target-bundle-dir-name/5374 "2022-04-05T12:30:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![CrouchEndTiger](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/c/f08c70/32.png) [@CrouchEndTiger](https://discourse.cmake.org/u/CrouchEndTiger)\
**Post date:** [April 5, 2022, 12:30pm UTC](https://discourse.cmake.org/t/help-feature-request-target-bundle-dir-name/5374/1 "2022-04-05T12:30:07Z")

</div>

I’m struggling to find a solution to my problem. It seems like it should be a pretty basic use case of generator expressions, but I can’t find the feature, or any workaround.

I’d like to have a generator expression which evaluates to the a target bundle directory name. $\<TARGET\_BUNDLE\_DIR:tgt\> will evaluate to the full path to the bundle dir, but I’d just like the name of this directory.

I feel like I’m missing a $\<TARGET\_BUNDLE\_DIR\_NAME:tgt\> generator expression. Does anyone know if such a feature exists, or if there is a workaround I could use?

Thanks in advance 🙂

---

<div class="post-metadata">

**Author:** ![CrouchEndTiger](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/c/f08c70/32.png) [@CrouchEndTiger](https://discourse.cmake.org/u/CrouchEndTiger)\
**Post date:** [April 5, 2022, 3:11pm UTC](https://discourse.cmake.org/t/help-feature-request-target-bundle-dir-name/5374/2 "2022-04-05T15:11:34Z")

</div>

Maybe I could use $\<TARGET\_FILE\_NAME:tgt\>/…/… but this seems brittle and messy…

---

<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:** [April 7, 2022, 4:48pm UTC](https://discourse.cmake.org/t/help-feature-request-target-bundle-dir-name/5374/3 "2022-04-07T16:48:18Z")

</div>

It seems like a gap. I would recommend filing a [feature request](https://gitlab.kitware.com/cmake/cmake/-/issues).

---

<div class="post-metadata">

**Author:** ![CrouchEndTiger](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/c/f08c70/32.png) [@CrouchEndTiger](https://discourse.cmake.org/u/CrouchEndTiger)\
**Post date:** [April 10, 2022, 7:43am UTC](https://discourse.cmake.org/t/help-feature-request-target-bundle-dir-name/5374/4 "2022-04-10T07:43:04Z")

</div>

👍 I’ve put in a feature request: [https://gitlab.kitware.com/cmake/cmake/-/issues/23409](https://gitlab.kitware.com/cmake/cmake/-/issues/23409)  
Feel free to upvote it 🙂
