Search code examples
c++visual-studioprojectbuild-processdirectory-structure

Set directory structure for all projects in a Visual Studio solution?


I would like to define paths for include, linking and binary output for all projects in my solution in a consistent manner.

The solution folders and projects are already created. Is there an automated way, to set relative output directories and include directories for all projects at once, or preferably, on a solution level?

For example, my current directory structure follows this.

repository (solution)
├─ README.md
├─ dependencies (solution folder)
│  └─ name (several projects)
│     ├─ *.h, *.cpp
│     └─ binary (*.dll or *.lib)
│        ├─ debug
│        └─ release
├─ managers (solution folder)
│  └─ name (several projects)
│     ├─ *.h, *.cpp
│     └─ binary (*.dll or *.lib)
│        ├─ debug
│        └─ release
├─ system (project)
│  ├─ *.h, *.cpp
│  └─ binary (*.dll or *.lib)
│     ├─ debug
│     └─ release
├─ modules (solution folder)
│  └─ name (several projects)
│     ├─ *.h, *.cpp
│     ├─ binary
│     │  ├─ debug
│     │  └─ release
│     └─ *.jpg, *.3ds, ... (assets)
└─ application (project)
   ├─ *.cpp
   └─ binary (*.exe)
      ├─ debug
      └─ release

Solution

  • What you are looking for is the property manager.

    See GUI to include a .prop file in a VS 2010 project? for how to get to the property manager.

    You can create your own property set and include it in all of your projects. Once you change something in the "global property set" all projects will be changed.

    EDIT: One more link to how property manager works: http://msdn.microsoft.com/en-us/library/ms173410%28v=vs.90%29.aspx