在我的 .pro 文件中,我找到了以下代码片段:
win32 {
CONFIG(debug, debug|release) {
LIBS += $$(QwtDir)/lib/qwtd.lib\
version.lib
} else {
LIBS += $$(QwtDir)/lib/qwt.lib\
version.lib
}
我查看了 qmake 的文档,它说你可以使用 CONFIG
作为条件语句,他们给出了 CONFIG(debug)
的示例,这意味着 if在 Debug模式下,但是 CONFIG(debug, debug|release)
又如何呢?这是什么意思?
最佳答案
When qmake processes a pro file it could process it up to three times depending on what the configuration is set to. Usually it will do it three times. Once for debug, once for release and one final one for debug_and_release
...this construct CONFIG(debug, debug|release) ... checks for when the debug configuration is being processed comparing where “debug” and “release” are mutually exclusive.
这摘自详细解释here .
关于c++ - qmake配置的含义是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25515358/