c++ - 为 Visual Studio 解决方案中的所有项目设置目录结构?

标签 c++ visual-studio project build-process directory-structure

我想以一致的方式为我的解决方案中的所有项目定义包含、链接和二进制输出的路径。

解决方案文件夹和项目已经创建。是否有一种自动化的方式来设置相关输出目录并同时包含所有项目的目录,或者最好是在解决方案级别?

比如我现在的目录结构是这样的。

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

最佳答案

您要找的是属性(property)经理。

参见 GUI to include a .prop file in a VS 2010 project?了解如何联系属性(property)经理。

您可以创建自己的属性集并将其包含在所有项目中。一旦您更改了“全局属性集”中的某些内容,所有项目都将更改。

编辑: 关于属性(property)经理如何工作的另一个链接:http://msdn.microsoft.com/en-us/library/ms173410%28v=vs.90%29.aspx

关于c++ - 为 Visual Studio 解决方案中的所有项目设置目录结构?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20053855/

相关文章:

c++在数组中读取结构时遇到问题

visual-studio - 不再可能在 Visual Studio 2015 中使用特定浏览器进行调试?

java - 你可以从 Maven 中的父 POM 继承版本吗?

Java 从错误的路径获取类

c++ - 刷新缓冲区是什么意思?

c++ - 尝试设置用户定义的消息处理程序时出现堆栈溢出(!)

c++ - 通过类析构函数中重置成员shared_ptrs解决C++11shared_ptr循环引用?

c# - 在 Visual Studio C# 中使用 DataGridView

c# - 第一次尝试构建失败然后通过

visual-studio - Visual Studio 模板和目录创建问题