Solved How to use debug/release switch in *.pro?
-
How to use debug/release switch in *.pro?
I have installed qt-4.8.6,worked with qt-creator2.7.0.
I created a project, and I want to make it different between debug and release, such as:
debug{
config += APP_OUTPUT_DEBUG_LOG_ON
}else{
config+=APP_OUTPUT_DEBUG_LOG_OFF
}
but It seems no effect, Because it always performed the first swtich:
------ APP_OUTPUT_DEBUG_LOG_OFF.when i output the config value:
message(config)It always contains both debug and release, perhaps this is the original reason.
How can I fix this?
-
try
CONFIG(debug, debug|release) {
#debug settings here....
}else{
#release settings here....
} -
It worked, Thank you very much!