# Get complete list of target's source files

**URL:** https://discourse.cmake.org/t/get-complete-list-of-targets-source-files/10717
**Category:** Usage
**Tags:** gen:xcode
**Created:** [April 22, 2024, 9:34pm UTC](https://discourse.cmake.org/t/get-complete-list-of-targets-source-files/10717 "2024-04-22T21:34:05Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Kentzo](https://discourse.cmake.org/user_avatar/discourse.cmake.org/kentzo/32/4122_2.png) [@Kentzo](https://discourse.cmake.org/u/Kentzo)
#### Post date: [April 22, 2024, 9:34pm UTC](https://discourse.cmake.org/t/get-complete-list-of-targets-source-files/10717/1 "2024-04-22T21:34:05Z")

</div>

I’m using Qt’s CMake commands to define my targets. Under the hood, due to how Qt builds its source files, the generated project ends up with many dynamically added files. When the Xcode project is generated, these files are added to the top level of the target which is rather annoying.

I know that there is the `source_group` command, but I cannot find a way to get the complete list of target’s files: these dynamic files are not listed in any of the target’s properties.

---

<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 27, 2024, 3:47pm UTC](https://discourse.cmake.org/t/get-complete-list-of-targets-source-files/10717/2 "2024-04-27T15:47:33Z")

</div>

> [@Kentzo](#):
>
> these dynamic files are not listed in any of the target’s properties.

CMake won’t be able to know their paths to mention in the Xcode project either. It’s something that would need to be known at configure time, I believe, to do correctly today.
