I have a Qt project for which I am trying to generate MSVC project and solution files using CMake. I have no prior experience with CMake, and therefore, I apologize if my question has an obvious solution that I am not able to see.
I have written a CMake file that generates a solution successfully. However, inside MSVC 2022, when I select the "show all files" option, instead of displaying the source files in a Source folder, the way it is in the actual directory and the picture shown below, it displays all of the files directly under the project. There are tutorials on the internet that show how to organize the project directory with MSVC filters using CMake, but I want to generate a project with a desired directory structure that can be viewed from MSVC, as shown in the picture below.
I have been stuck at it for more than a day and can't find any solutions. Please help!
.
Asked
Active
Viewed 64 times
0

Idris Khan
- 73
- 1
- 9
-
Does this answer your question? [How to set Visual Studio Filters for nested sub directory using cmake](https://stackoverflow.com/questions/31422680/how-to-set-visual-studio-filters-for-nested-sub-directory-using-cmake) – Milan Š. Jan 25 '23 at 08:27
-
but its using filters... i want to be able to see the folders in the "show all files" view, which is how it is normally if one is to create a visual studio project... – Idris Khan Jan 25 '23 at 08:33
-
Visual studio displays the projects file tree using filters. – Milan Š. Jan 25 '23 at 09:00