mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
2677f3ca79
commit
12b73912f2
1 changed files with 3 additions and 1 deletions
|
@ -138,6 +138,7 @@ isEmpty(LIBGIT2DEVEL) {
|
||||||
} else {
|
} else {
|
||||||
INCLUDEPATH += $$LIBGIT2DEVEL/include
|
INCLUDEPATH += $$LIBGIT2DEVEL/include
|
||||||
isEmpty(LIBGIT2STATIC) {
|
isEmpty(LIBGIT2STATIC) {
|
||||||
|
setRpath: LIBS += -rpath $$LIBGIT2DEVEL/build
|
||||||
LIBS += -L$$LIBGIT2DEVEL/build -lgit2 -lz -lcrypto
|
LIBS += -L$$LIBGIT2DEVEL/build -lgit2 -lz -lcrypto
|
||||||
} else {
|
} else {
|
||||||
LIBS += $$LIBGIT2DEVEL/build/libgit2.a -Wl,-Bstatic -lz -lssl -lcrypto -Wl,-Bdynamic -ldl
|
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) {
|
!isEmpty(LIBMARBLEDEVEL) {
|
||||||
# find it next to our sources
|
# find it next to our sources
|
||||||
INCLUDEPATH += $$LIBMARBLEDEVEL/include
|
INCLUDEPATH += $$LIBMARBLEDEVEL/include
|
||||||
|
setRpath: LIBS += -rpath $$LIBMARBLEDEVEL/lib
|
||||||
LIBS += -L$$LIBMARBLEDEVEL/lib
|
LIBS += -L$$LIBMARBLEDEVEL/lib
|
||||||
}
|
}
|
||||||
!contains(DEFINES, NO_MARBLE) {
|
!contains(DEFINES, NO_MARBLE) {
|
||||||
win32: CONFIG(debug, debug|release): LIBS += -lmarblewidgetd
|
win32: CONFIG(debug, debug|release): LIBS += -lmarblewidgetd
|
||||||
else: !isEmpty(SPECIAL_MARBLE_PREFIX) {
|
else: !isEmpty(SPECIAL_MARBLE_PREFIX) {
|
||||||
LIBS += -L$$LIBMARBLEDEVEL/src/lib/marble -lssrfmarblewidget
|
LIBS += -lssrfmarblewidget
|
||||||
} else {
|
} else {
|
||||||
LIBS += -lmarblewidget
|
LIBS += -lmarblewidget
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue