code_fodder code_fodder - 4 months ago 9
Linux Question

Is there a Qt install path variable that I can use in the .pro file?

I want to copy an audio plugin to my target directory since I need it for deployment.

It lives in


I don't know what variable I can use to reference the install path inside my /pro file.

The line of code I want to add is something like this:

QMAKE_PRE_LINK += cp $$PATH_TO_QT_INSTAL/gcc/plugins/audio/* $$DESTDIR/lib || :;

There is an environment variable called
that gets me to
which I could use, but I seem to be only able to use this in the qt creator gui build settings which is no good to me since these settings live in the .pro.user file. WHY doesn't qt have a generic build settings mechanism : ( ... (that's just a side question, no need to answer)

My question is how can I reference the qt install path in my pro file, is there a variable that can do this, or any other way?


For Qt4 and Qt5, looks like $$[QT_INSTALL_LIBS] is what you want? Can't confirm first-hand this works though.

See and