Solved Using SYSROOT in .pro file
-
Is sysroot accessible via some predefined environment variable in the .pro file? I would like to specify library path on the target using the sysroot, e.g.:
LIBS += -L$${SYSROOT}/my/lib/location -lmisc
I tried using
QT_SYSROOT
which does have the value that I want, but that doesn't seem to work in the pro file. Can the qmake variables not be used? -
Hi,
IIRC, you have to use square brackets to get such a property from qmake itself.
-
Thanks, that works! Use as follows:
LIBS += -L$$[QT_SYSROOT]/my/lib/location -lmisc
Official documentation here: http://doc.qt.io/qt-5.9/qmake-language.html (See "Accessing qmake Properties".)