Setup
I have a local installation of Qt located in my home directory:
/home/user/Qt/...
(from now on, devdir).The Qt application that I'm trying to package installs the relevant Qt shared libraries to
/usr/lib/myapplication
(from now on, installdir).My packaging process is currently set up like this:
qmake
>dh_make -s --createorig
>debuild
Problem
I am trying to set RPATH
in myapplication.pro to only link to libraries in installdir, but it is currently linking to both installdir and devdir.
I think it has to do with qmake
creating dependencies to the installation libraries automatically. To try to stop it, I have run the build process with qmake -nodepend
, but that hasn't stopped the link to devdir from happening.
How do I force qmake
to link only to libraries in installdir?
Code
In myapplication.pro:
QMAKE_LFLAGS = -Wl,-rpath,/usr/lib/myapplication
The resulting link flags in the Makefile are:
LFLAGS = -Wl,-rpath,/usr/lib/myapplication -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-rpath,/home/user/Qt/5.3/gcc_64 -Wl,-rpath,/home/user/Qt/5.3/gcc_64/lib