I ran into the same issue today while trying to use environment variables in a LIBS definition and I found the following link http://bugreports.qt.nokia.com/browse/QTBUG-16531, which indicated a simple workaround. The key is to the instant resolution syntax $$() to resolve the environment variable. So, while
LIBRARIESBASE = %USERPROFILE%\local
LIBS += -L$$quote($$LIBRARIESBASE\lib) -lmylib
LIBRARIESBASE = %USERPROFILE%\local
LIBS += -L$$quote($$LIBRARIESBASE\lib) -lmylib
To copy to clipboard, switch view to plain text mode
does not resolve with quotes if %USERPROFILE% contains spaces,
LIBRARIESBASE = $$(USERPROFILE)\local
LIBS += -L$$quote($$LIBRARIESBASE\lib) -lmylib
LIBRARIESBASE = $$(USERPROFILE)\local
LIBS += -L$$quote($$LIBRARIESBASE\lib) -lmylib
To copy to clipboard, switch view to plain text mode
works just fine.
I hope this is able to help someone else out.
Bookmarks