How to set different qmake configuration depending on debug / release?

后端 未结 2 1520
无人共我
无人共我 2021-02-13 05:14

I need to specify different output and intermediate folders in my .pro file for debug and release builds. I created a following test .pro file:

release {
  messa         


        
2条回答
  •  北恋
    北恋 (楼主)
    2021-02-13 05:39

    According to the qmake manual:

    CONFIG(release, debug|release) {
      message( "release" )
    }
    CONFIG(debug, debug|release) {
      message( "debug" )
    }
    

    I don't really get the explanation, though. It seems that both of the options are really selected, and only one of them is "active". But qmake is famous for counter-intuitive things.

提交回复
热议问题