Does qmake support a QMAKE_ variable for setting -rpath-link?
-
wrote on 17 Apr 2013, 19:43 last edited by
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
-
wrote on 18 Apr 2013, 07:13 last edited by
Hi
have you tried with QMAKE_RPATHDIR??
-
wrote on 18 Apr 2013, 19:47 last edited by
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.
-
wrote on 19 Apr 2013, 07:52 last edited by
Sorry,
I write wrong; I means QMAKE_RPATH
-
wrote on 19 Apr 2013, 20:22 last edited by
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.
1/5