Zabierasz się do tego od złej strony.
To ty masz zmodyfikować wartość QT
w zależności od konfiguracji
Spróbuj pokombinować z tym:
Creating Project Files | qmake Manual
General Configuration
The CONFIG variable specifies the options and features that the project should be configured with.
The project can be built in release mode or debug mode, or both. If debug and release are both specified, the last one takes effect. If you specify the debug_and_release
option to build both the debug and release versions of a project, the Makefile that qmake generates includes a rule that builds both versions. This can be invoked in the following way:
make all
Adding the build_all
option to the CONFIG
variable makes this rule the default when building the project.
Note: Each of the options specified in the CONFIG
variable can also be used as a scope condition. You can test for the presence of certain configuration options by using the built-in CONFIG() function. For example, the following lines show the function as the condition in a scope to test whether only the opengl
option is in use:
CONFIG(opengl) { message(Building with OpenGL support.) } else { message(OpenGL support is not available.) }
This enables different configurations to be defined for release
and debug
builds. For more information, see Using Scopes.
The following options define the type of project to be built.
Note: Some of these options only take effect when used on the relevant platform.
Option |
Description |
qt |
The project is a Qt application and should link against the Qt library. You can use the QT variable to control any additional Qt modules that are required by your application. This value is added by default, but you can remove it to use qmake for a non-Qt project. |
x11 |
The project is an X11 application or library. This value is not needed if the target uses Qt. |
The application and library project templates provide you with more specialized configuration options to fine tune the build process. The options are explained in detail in Building Common Project Types.
For example, if your application uses the Qt library and you want to build it in debug
mode, your project file will contain the following line:
CONFIG += qt debug
Note: You must use "+=", not "=", or qmake will not be able to use Qt's configuration to determine the settings needed for your project.