Qt Creator: Build COnfiguration: create new configurations and seleting option depending on them?
-
I created two new build configuration "DebugTgt" and "ReleaseTGT", cloned from debug and release. I wont them build as original release and debug but linking with a different library and changing some defiles.
I supposed a new configuration will build into a new directory i.e. <build-directory>/DebugTgt in place of the original <build-directory>/debug, but it keep building into <build-directory>/debug. I know I can change it by hand, by I wonder if there is a way to make it automatically, that is appending the build configuration name to the <build-directory> ad standard configurations do.
I also suppose I can add to the .pro file something as:
@
DebugTGT {
LIBS += myTgtLib.a
DEFINES+= DISABLE_BOARD_SIMULATOR
TARGET = app_for_tgt
}
@But this doesn't work (the "tgt" version should link against a library that access a PCI board, while the default configuration simple use a board simulator)
-
Thanks, it works except that Qt Creator doesn't create a build directory for the new configuration, under the main build directory, as it does for debug and release. I have to manually change it from in the project configuration, so I suppose I have to pay attention if I move the project to another location (I have not tried yet).
Also, the TARGET change the executable file name but the creator always try to launch it with the original name. Can be fixed in the "Run Configuration", but it seem to me it is not associated to the Build configuration so I have to change it manually then I change the configuration.
So far, I keep the same target name, it easier.
-
calberto: Qt Creator does not create separate build directories per configuration (yet:-).
Debug and release are actually created by qmake based on the CONFIG used to build.