Does qmake support a QMAKE_ variable for setting -rpath-link?
-
There is QMAKE_RPATHDIR that sets -rpath. But is there, a macro that sets -rpath-link?
(If not, is it wise to submit a feature request?)For now, I'm using unix:LIBS += -Wl,-rpath-link,/path/to/lib
-
Hi
have you tried with QMAKE_RPATHDIR??
-
Yes. QMAKE_RPATHDIR sets -rpath, which is different from -rpath-link. The former hardcodes paths into the binary, the latter just tells the linker where to look to satisfy dependencies without hardcoding tha paths.
-
Sorry,
I write wrong; I means QMAKE_RPATH
-
According to the "docs":http://qt-project.org/doc/qt-4.8/qmake-variable-reference.html#qmake-lflags-rpath: all of these are the same. Strange that there are three of them, then. Perhaps, it's worth trying if they actually translate into exactly the same link line.
QMAKE_LFLAGS_RPATH
This is used on Unix platforms only.
Library paths in this definition are added to the executable at link time so that the added paths will be preferentially searched at runtime.
QMAKE_RPATH
This is used on Unix platforms only.
Is equivalent to QMAKE_LFLAGS_RPATH.
QMAKE_RPATHDIR
This is used on Unix platforms only.
A list of library directory paths, these paths are added to the executable at link time so that the paths will be preferentially searched at runtime.