As far as I know, qmake allows only one TARGET, with one exception. Thus, if you want to create a debug version and a release version, you can build both with the same project file. Thus, you can also specify DEFINITIONS for each assembly separately. Keep in mind that you can use the strip command to remove debugging after the fact, and it may be useful for your circumstances. Qt4 HTML documents (see if they are installed on your system) describe the debug_and_release mode in qmake-common-projects.html.
Now that itβs said, you are allowed several project files. Create one project for each executable file, with the desired OPERATIONS for each project. Use the qmake -o flag to release separate Makefiles for each target and one Makefile to link them. I can not help you with QtCreator, because I do not use it, but it works on the command line. A sample Makefile that illustrates this diagram will look something like this:
all: Makefile_A Makefile_B $(MAKE) -f Makefile_A $(MAKE) -f Makefile_B Makefile_A: withSomeFlag.pro qmake -o $@ $< Makefile_B: withoutSomeFlag.pro qmake -o $@ $<
It's just a quick file that does the job, and someone better at Makefiles can make it more general. NOTE. Indenting Makefiles are single TAB characters, not 8 spaces.
Also note that the default executable name matches the base name of the project file. Hope this makes you go to some extent.
source share