c++ - qmake配置的含义是什么

标签 c++ qt qmake

在我的 .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/

相关文章:

qt - 如何配置 qmake 以便我的应用程序安装为 "make install"?

qt - 我可以让 qmake -project 将 LIBS += .... 添加到我的 .pro 文件中吗?

C++ istream - 如何读取带空格的字符串

c++ - 无法引用变量...为什么?

c++ - 显式模板特化

c++ - 在 C++ 中使用对数实现运算符重载

css - 未读数据的 QTabBar 选择器

c++ - A* 寻路 - 巨大的开放 map 速度慢

qt - 基本 Qt GUI : QPushButton for Drawing a line

c++ - 在类方法之间传递 QImage 对象