Qt-interest Archive, May 2008
Re: multiple executables
Message 1 in thread
I want to do them at the same time. Is that possible?
thanks
Yifei
----- Original Message -----
From: "Dominik Riebeling" <dominik.riebeling@xxxxxxxxx>
To: "Yifei Li" <yifli@xxxxxxx>
Sent: Thursday, May 01, 2008 06:08
Subject: Re: multiple executables
> On Wed, Apr 30, 2008 at 10:44 PM, Yifei Li <yifli@xxxxxxx> wrote:
>> I want to build different executables with different preprocessor options
>> (-D), can I do that with a single .pro file?
>
> you can add multiple optional blocks in the pro file similar like OS
> dependent blocks and enable them with -config <name> when calling
> qmake. For example, you could add a configuration "foo":
>
> foo {
> LIBS += -lfoo
> }
>
> and then call
> qmake -config foo
>
> to enable it.
> Or do you want to build those binaries at the same time?
>
> - Dominik
>
--
[ signature omitted ]
Message 2 in thread
On Thu, May 1, 2008 at 3:02 PM, Yifei Li <yifli@xxxxxxx> wrote:
> I want to do them at the same time. Is that possible?
I don't know of any way to easily achieve this using a single .pro
file. Thinking about it, you need to create object files multiple
times (like one file with your define set, another one without the
define) but unless you add more magic to put objects in different
folders those will conflict.
But why do you want to do this with a single pro file at the same
time? Just build out-of-tree, use something like I mentioned earlier
and have two build trees along with your sources, each one configured
as you need. Then you can just call "make -C build1; make -C build2"
and are done -- and even put that in a small build script.
- Dominik
--
[ signature omitted ]