# combine cmakelist

**URL:** https://discourse.cmake.org/t/combine-cmakelist/7624
**Category:** Code
**Tags:** tool:cmake
**Created:** [March 8, 2023, 2:21am UTC](https://discourse.cmake.org/t/combine-cmakelist/7624 "2023-03-08T02:21:09Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![fawad](https://discourse.cmake.org/user_avatar/discourse.cmake.org/fawad/32/3232_2.png) [@fawad](https://discourse.cmake.org/u/fawad)
#### Post date: [March 8, 2023, 2:21am UTC](https://discourse.cmake.org/t/combine-cmakelist/7624/1 "2023-03-08T02:21:09Z")

</div>

I have a root directroy with a list of projects in subfolder and a cmakelist.txt file with some code, then in the subfolder their are more folders and a cmakelist.txt, then in the subfolder i have a project file and its cmakelist.txt, i want to combine them so that i many only have all the details of the last project in the subfolder and all the dependency detail should be availible in that as well.

---

<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: [March 15, 2023, 1:07am UTC](https://discourse.cmake.org/t/combine-cmakelist/7624/2 "2023-03-15T01:07:24Z")

</div>

I don’t think it’s completely clear what you’re asking here. Can you provide an example of what you have now and annotate it with what you want it to look like?
