I have setted an environment variable like this:
XXX_ENV H:\xxx
I can see
H:\xxx
when I run command
echo %XXX_ENV%
in cmd. Then I have a Qt .pro file like this:
> INCLUDEPATH += ($$(XXX_ENV))/include but unfortunately the INCLUDEPATH don't work, I can't use those .h file in H:\xxx\include
How can I use the environment varibale in qmake file ?
---------------------update---------------------------------
May be my description is not detaild enough.
This is the case. I have introduced a third party component into my project. The relevant files are in H:\XXX and i can use head files in H:\XXX\include. So my qmake can be writed like this:
INCLUDEPATH += H:/XXX/include Then I can use head file "aaa.h" which is under directory H:\XXX\include just like this:
#include <aaa.h> But I don't want to write the absolute path in the qmake file. So I seted a Windows environment variable(not qmake file's variable) XXX_ENV and it's value is "H:\XXX"(or "H:/XXX").
I just want to know can I write INCLUDEPATH += $${XXX_ENV}/include instead of INCLUDEPATH += H:/XXX/include
I tried it but it didn't work.