Qmake in release and debug mode

非 Y 不嫁゛ 提交于 2019-12-02 00:04:30

The opening brace should be on the same line as the condition:

CONFIG(debug, debug|release) {
    DLLDESTDIR += $$quote(../../../Jane/Jane/Build/debug)
    message("Copying to Jane Debug Directory.")
}
CONFIG(release, debug|release) {
    DLLDESTDIR += $$quote(../../../Jane/Jane/Build/release)
    message("Copying to Jane Release Directory.")
}

or

CONFIG(debug, debug|release) {
    DLLDESTDIR += $$quote(../../../Jane/Jane/Build/debug)
    message("Copying to Jane Debug Directory.")
} else {
    DLLDESTDIR += $$quote(../../../Jane/Jane/Build/release)
    message("Copying to Jane Release Directory.")
}

But both messages will be displayed, because the files Makefile.Debug and Makefile.Release are both created when you run qmake (on Windows, or if you add debug_and_release to the CONFIG variable on other OSes).

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!