Solved CurrentBuild:Type
-
Hi!
I have a
common.pri
configuration file that, among other things, defines the output directories.I would like to generate a different path for debug and release products, say
.../products/debug/bin
and...products/release/bin
.I found the
CurrentBuild:Type
variable, but when I can not use to use in mycommon.pri
. I tried a simplemessage("CurrentBuild:Type = "%{CurrentBuild:Type})
, but I gotProject MESSAGE: CurrentBuild:Type = %{CurrentBuild:Type}
So, how can I use
%{CurrentBuild:Type}
in mycommon.pri
file? Or, is there another way to know the "name"/string/identifier of the mode (debug or release) it is being used?Thanks!
-
That's the usual way to detect mode:
CONFIG(debug, debug|release) { message("This is debug mode or debug_and_release") } else { message("This is release mode or debug_and_release") }
-
Thanks!