[Qt-interest] qmake: how to find Qt libraries / Qt home directory?
Oliver.Knoll at comit.ch
Oliver.Knoll at comit.ch
Fri Jan 7 11:28:13 CET 2011
John, K. Frank, Sean,
thanks for your answers! I overlooked the -query option of qmake, thanks for that!
On 2011-01-06 Frank K. Frank wrote:
>> ...
>> this must be a stupid question, but I just don't see it: How do I find
>> out where the Qt libraries (on Windows for that matter) are located?
>> ...
>> I guess I could rely on the QTDIR environment variable ...
> Remember, qmake has hard-coded into it Qt's installation location.
That is /exactly/ the reason why I was very reluctant of using any QTDIR, since that could point anywhere and qmake (which depends on PATH) itself could be coming from another Qt installation.
Not to mention that QTDIR might not be set at all etc.
Hence my search for any other means of figuring out the Qt base location.
> ... it doesn't
> use any such environment variable, so you have no way to override the
> hard-coded location.
Correct.
> So I think "qmake -v" (and, as Sean mentioned, "qmake -query") are the
> way to go (short of searching through your hard drive).
I think qmake -query here is the way to go, as the output looks more "stable" for parsing.
And I can even do a qmake -query QT_INSTALL_BINS which returns exactly what I am looking for.
However, this seems to confirm that there is really no such equivalent variable in qmake itself, which would be really convenient.
Thanks,
Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
More information about the Qt-interest-old
mailing list