rpath improvements

Improve on the previous commit adding QMAKE_RPATHDIR. We can now use
rpath for out-of-source builds, as well as on osx.
This commit is contained in:
Matt Broadstone 2014-09-13 18:15:45 -04:00
parent 1eea37cb6f
commit 9887fa2333
3 changed files with 6 additions and 2 deletions

View File

@ -11,5 +11,4 @@ script:
- cd build
- qmake ..
- make
- export LD_LIBRARY_PATH=$PWD/src
- make check

View File

@ -9,6 +9,7 @@ DEFINES += QAMQP_BUILD
CONFIG += $${QAMQP_LIBRARY_TYPE}
VERSION = $${QAMQP_VERSION}
win32:DESTDIR = $$OUT_PWD
macx:QMAKE_LFLAGS_SONAME = -Wl,-install_name,@rpath/
PRIVATE_HEADERS += \
qamqpchannel_p.h \

View File

@ -1,7 +1,11 @@
INCLUDEPATH += $${QAMQP_INCLUDEPATH} $${PWD}/common
LIBS += -L$${DEPTH}/src $${QAMQP_LIBS}
QMAKE_RPATHDIR += $${DEPTH}/src
unix:!macx:QMAKE_RPATHDIR += $${OUT_PWD}/$${DEPTH}/src
macx {
QMAKE_RPATHDIR += @loader_path/$${DEPTH}/src
QMAKE_LFLAGS += -Wl,-rpath,@loader_path/$${DEPTH}/src
}
QT = core network testlib
QT -= gui