Solved can i detect "Edit build configuration" in the .pro file?
-
My "edit build configuration" menu looks like this:
Can i detect the contents of the currently selected menu item in my .pro file?
(by the way, is the ".pro" file actually a "qmake" file? if so, why not have the extension be ".qmake" ? but i digress)
I'd like to have different #defines based on that menu, eg: i'd like to do something like this in the .pro file:
contains (build_config, "Pro") { DEFINES += KJAMS_PRO } contains (build_config, "2") { DEFINES += KJAMS_2 }
but how?
-
oh, i see, i did this:
so it LOOKS LIKE i've already set this up for myself! hah! -
@davecotter said in can i detect "Edit build configuration" in the .pro file?:
Can i detect the contents of the currently selected menu item in my .pro file?
No.
by the way, is the ".pro" file actually a "qmake" file?
Yes, it is.
I'd like to have different #defines based on that menu, eg: i'd like to do something like this in the .pro file
You can. Then you'd run qmake on the project from the command line and instead of configuring it inside the creator you'd do an "Import build" from the "Configure project" pane.
-
that's precisely what i wish to avoid.
i want to select the config (menu, lower left), and hit "build" (in the IDE) and have that be that. sounds like it can't happen?
-
@davecotter said in can i detect "Edit build configuration" in the .pro file?:
i want to select the config (menu, lower left), and hit "build" (in the IDE) and have that be that. sounds like it can't happen?
Not that I know of.
-
so, umm, well i put this in my qmake file:
message($${TARGET} $${build_depth}bit)
and the result is this:
Project MESSAGE: kJams 2 Debug 64bit
so it seems that i AM able to detect the current target. Does this seem surprising to you?
-
@davecotter said in can i detect "Edit build configuration" in the .pro file?:
Does this seem surprising to you?
Very. Never seen that.
Edit:
Does this mean that Creator overwritesTARGET
in the .pro file? -
oh, i see, i did this:
so it LOOKS LIKE i've already set this up for myself! hah!