[Qt-interest] qmake: how to find Qt libraries / Qt home directory?

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Thu Jan 6 17:14:32 CET 2011


Hi,

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?

The reason is I want to provide a "custom target" which would copy the required Qt DLLs into the "distribution" directory of my app.

I am sure there must be some qmake variable which I must have missed about 10 times when scrolling up and down http://doc.trolltech.com/4.7/qmake-variable-reference.html.

The closest I found was QMAKE_LIBDIR_QT, but that points to C:\Qt\2010.05\qt\lib instead of the desired C:\Qt\2010.05\qt\bin. Close enough, but is there really no "QMAKE_QT_DIR" or the like which would point to the Qt DLL directory? Or at least to the Qt "base directory", like the (optional!) QTDIR does?

I guess I could rely on the QTDIR environment variable and use that, but since qmake itself does not need that, there must be a way for qmake to know where its Qt libraries are (basically the information you get with 'qmake -v'), and so I am almost sure there is also a qmake variable which would contain that value, no?


Thanks,
  Oliver
-- 
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22




More information about the Qt-interest-old mailing list