# PROPERTIES project\_group

**URL:** https://discourse.cmake.org/t/properties-project-group/6129
**Category:** Development
**Created:** [July 22, 2022, 2:30pm UTC](https://discourse.cmake.org/t/properties-project-group/6129 "2022-07-22T14:30:52Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![mickae1](https://discourse.cmake.org/user_avatar/discourse.cmake.org/mickae1/32/2479_2.png) [@mickae1](https://discourse.cmake.org/u/mickae1)
#### Post date: [July 22, 2022, 2:30pm UTC](https://discourse.cmake.org/t/properties-project-group/6129/1 "2022-07-22T14:30:52Z")

</div>

I need in my project, to organize my sub projects.

Can you add this functionality ?

set\_target\_properties(${project\_name} PROPERTIES PROJECT\_GROUP group\_name)

I’m not the first one that talk about it, I found many reference about “PROJECT\_GROUP” for CMAKE.

Thank you,

---

<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: [July 22, 2022, 5:08pm UTC](https://discourse.cmake.org/t/properties-project-group/6129/2 "2022-07-22T17:08:46Z")

</div>

What would this property actually do? Nothing is stopping you from adding such a property today…but what it _does_ needs more explanation here.

---

<div class="post-metadata">

### Author: ![mickae1](https://discourse.cmake.org/user_avatar/discourse.cmake.org/mickae1/32/2479_2.png) [@mickae1](https://discourse.cmake.org/u/mickae1)
#### Post date: [July 22, 2022, 6:02pm UTC](https://discourse.cmake.org/t/properties-project-group/6129/3 "2022-07-22T18:02:06Z")

</div>

It’s the same idea as

[https://cmake.org/cmake/help/latest/command/source\_group.html](https://cmake.org/cmake/help/latest/command/source_group.html)

But with the project:

Define a grouping for project in IDE project generation.

---

<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: [July 22, 2022, 11:41pm UTC](https://discourse.cmake.org/t/properties-project-group/6129/4 "2022-07-22T23:41:15Z")

</div>

This would need some investigation in how to do this at the IDE generator level. If groups can’t be disjoint[1], this is probably going to make generation a real pain as targets will need grouped before writing out.

[1] Something like:

```auto
group1/
  lib1a
group2/
  lib2
group1/ # should join the first `group1`
  lib1b

```

given a declaration order like:

```cmake
add_library(lib1a)
add_library(lib2)
add_library(lib1b)

```

---

<div class="post-metadata">

### Author: ![hsattler](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/h/59ef9b/32.png) [@hsattler](https://discourse.cmake.org/u/hsattler)
#### Post date: [July 23, 2022, 10:19pm UTC](https://discourse.cmake.org/t/properties-project-group/6129/5 "2022-07-23T22:19:54Z")

</div>

Isn’t [https://cmake.org/cmake/help/latest/prop\_tgt/FOLDER.html](https://cmake.org/cmake/help/latest/prop_tgt/FOLDER.html) doing that?

---

<div class="post-metadata">

### Author: ![mickae1](https://discourse.cmake.org/user_avatar/discourse.cmake.org/mickae1/32/2479_2.png) [@mickae1](https://discourse.cmake.org/u/mickae1)
#### Post date: [July 25, 2022, 7:14am UTC](https://discourse.cmake.org/t/properties-project-group/6129/6 "2022-07-25T07:14:29Z")

</div>

You are right:

set\_target\_properties(${project\_name} PROPERTIES FOLDER “Lib”)

it’s working in the IDE.

Thanks,
