Qt 6.11 is out! See what's new in the release
blog
CurrentBuild:Type
-
Hi!
I have a
common.priconfiguration 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/binand...products/release/bin.I found the
CurrentBuild:Typevariable, 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.prifile? 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") } -
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") }