如何在 pro 文件中定义配置?
如何在 pro 文件中定义配置?
默认情况下,我们有两个配置,调试和发布。我想添加 2 个其他配置,但不在 pro.user 中!在专业文件中。
how to define a config in pro file ?
by default, we have two config, debug and release. I want to add 2 other config but not in pro.user ! in pro file.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你的问题有点不清楚。听起来也许您当前正在从命令行使用“调试”和“发布”进行构建,并且您想要添加与此类似的自己的构建变体。
如果是这样的话......其机制是
addExclusiveBuilds
。这是一个例子。如果您不习惯阅读 qmake 代码,我不建议您乱搞它。Your question is a bit unclear. It sounds like maybe you're currently building with "debug" and "release", from the command line, and you want to add your own build variants similar to that.
If that's the case... the mechanism for this is
addExclusiveBuilds
. Here is an example. I wouldn't recommend to mess around with it if you aren't comfortable reading qmake code.如果我明白你在说什么,你可以将你想要的内容添加到
CONFIG
变量中:请参阅 qmake 手册,其中讨论了
CONFIG
变量,特别是在本节末尾附近。If I understand what you are saying, you add what you want to the
CONFIG
variable:See the qmake manual where it talks about the
CONFIG
variable, especially near the end of the section.