views:

917

answers:

1

I would like to build qt and qt application out of the source tree. Do you know how to set from the command line the .obj directory both with configure and qmake?

+1  A: 

If I understand question correctly you should set OBJECTS_DIR variable in *.pro file for any directory you want. If you don't want to change *.pro file try

qmake "OBJECTS_DIR=some_dir" *.pro

kemiisto
This works but I would like to put all my object file in a directory without worry every time to set the OBJECTS_DIR. Can I set a variable in the bash_profile? The second question is about qt itself. It use autotools but I don't know how to build it out of tree. With KDE and cmake I can do it.
Breezeight
@nicolabrisotto: If you don't want to change the *.pro files, and don't want to have to remember the command each time, you could create an alias as such: alias my_qmake="qmake \"OBJECTS_DIR=some_dir\" ", which would allow you to type "my_qmake foo.pro" and have the OBJECTS_DIR variable set.
Caleb Huitt - cjhuitt