[Qt-interest] TARGET variable in qmake

R. Reucher rene.reucher at batcom-it.net
Fri Dec 4 09:52:42 CET 2009


On Thu December 3 2009 20:40 Scott.Bloom at sabgroup.com wrote:
> At some point in the qmake flow,  the variable TARGET is used to set the
> directory leaf name.  Somewhere it checks if its blank, and if it is, it
> sets it to the basename of the project file.
> 
> I need to use similar logic, to set the OBJECTS_DIR to essentially
> ../../objs/$${TARGET}/
> 
> Any ideas on how?
How about this:

...
MY_PRO_FILE = $$basename(_PRO_FILE_)
isEmpty($$TARGET): TARGET = $$replace(MY_PRO_FILE, ".pro", "")
OBJECTS_DIR = ../../objs/$$TARGET/
...

?!

HTH, René
-- 
René Reucher
rene.reucher at batcom-it.net
http://www.batcom-it.net/



More information about the Qt-interest-old mailing list