summaryrefslogtreecommitdiffstats
path: root/subsurface-configure.pri
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-17 21:46:05 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-17 21:48:22 -0800
commit12b73912f2c80ddbc690bd44cc44b8ce09488511 (patch)
treef6c1ac285723e47f98ced4e86c8468bd850d2021 /subsurface-configure.pri
parent2677f3ca79f31c6aba1141d3402c888b57f20959 (diff)
downloadsubsurface-12b73912f2c80ddbc690bd44cc44b8ce09488511.tar.gz
Use rpath to make binaries run without LD_LIBRARY_PATH
When building binaries with our custom libraries it is always a pain to ensure that all the libraries are found. Adding an rpath can help. When running qmake with CONFIG+=setRpath we include the paths for our private builds of libgit2 and libssrfmarble (assuming those are not using the system libraries). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-configure.pri')
-rw-r--r--subsurface-configure.pri4
1 files changed, 3 insertions, 1 deletions
diff --git a/subsurface-configure.pri b/subsurface-configure.pri
index d2092d3ac..3cba31279 100644
--- a/subsurface-configure.pri
+++ b/subsurface-configure.pri
@@ -138,6 +138,7 @@ isEmpty(LIBGIT2DEVEL) {
} else {
INCLUDEPATH += $$LIBGIT2DEVEL/include
isEmpty(LIBGIT2STATIC) {
+ setRpath: LIBS += -rpath $$LIBGIT2DEVEL/build
LIBS += -L$$LIBGIT2DEVEL/build -lgit2 -lz -lcrypto
} else {
LIBS += $$LIBGIT2DEVEL/build/libgit2.a -Wl,-Bstatic -lz -lssl -lcrypto -Wl,-Bdynamic -ldl
@@ -156,12 +157,13 @@ contains(QMAKE_PLATFORM, android): DEFINES += NO_MARBLE NO_USERMANUAL NO_PRINTIN
!isEmpty(LIBMARBLEDEVEL) {
# find it next to our sources
INCLUDEPATH += $$LIBMARBLEDEVEL/include
+ setRpath: LIBS += -rpath $$LIBMARBLEDEVEL/lib
LIBS += -L$$LIBMARBLEDEVEL/lib
}
!contains(DEFINES, NO_MARBLE) {
win32: CONFIG(debug, debug|release): LIBS += -lmarblewidgetd
else: !isEmpty(SPECIAL_MARBLE_PREFIX) {
- LIBS += -L$$LIBMARBLEDEVEL/src/lib/marble -lssrfmarblewidget
+ LIBS += -lssrfmarblewidget
} else {
LIBS += -lmarblewidget
}