[Qt-interest] TARGET variable in qmake

Scott Aron Bloom Scott.Bloom at sabgroup.com
Fri Dec 4 16:44:52 CET 2009


I did everything I could to get the basename working in my windows build env, to no avail...

Ill try your exact format and hope for the best.. I don’t think it worked yesterday when I tried.

Scott

-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of R. Reucher
Sent: Friday, December 04, 2009 12:53 AM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] TARGET variable in qmake

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/
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list