mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
OP-1654 Fix linux rpath: Refactored and changed for libs
This commit is contained in:
parent
f6c9183dbf
commit
fea74125fa
@ -10,7 +10,6 @@ QT += xml widgets
|
||||
SOURCES += main.cpp \
|
||||
gcssplashscreen.cpp
|
||||
|
||||
include(../rpath.pri)
|
||||
include(../libs/utils/utils.pri)
|
||||
include(../libs/version_info/version_info.pri)
|
||||
|
||||
@ -27,9 +26,13 @@ win32 {
|
||||
FILETYPES.files = profile.icns prifile.icns
|
||||
FILETYPES.path = Contents/Resources
|
||||
QMAKE_BUNDLE_DATA += FILETYPES
|
||||
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Plugins/
|
||||
} else {
|
||||
target.path = /bin
|
||||
INSTALLS += target
|
||||
QMAKE_RPATHDIR = \'\$$ORIGIN\'/../$$GCS_LIBRARY_BASENAME/openpilotgcs
|
||||
QMAKE_RPATHDIR += \'\$$ORIGIN\'/../$$GCS_LIBRARY_BASENAME/qt5
|
||||
include(../rpath.pri)
|
||||
}
|
||||
|
||||
OTHER_FILES += openpilotgcs.rc
|
||||
|
@ -6,17 +6,21 @@ win32 {
|
||||
|
||||
DESTDIR = $$GCS_LIBRARY_PATH
|
||||
|
||||
include(rpath.pri)
|
||||
|
||||
TARGET = $$qtLibraryName($$TARGET)
|
||||
|
||||
contains(QT_CONFIG, reduce_exports):CONFIG += hGCS_symbols
|
||||
|
||||
!macx {
|
||||
macx {
|
||||
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Plugins/
|
||||
} else
|
||||
win32 {
|
||||
target.path = /bin
|
||||
target.files = $$DESTDIR/$${TARGET}.dll
|
||||
} else {
|
||||
QMAKE_RPATHDIR = \'\$$ORIGIN\'
|
||||
QMAKE_RPATHDIR += \'\$$ORIGIN\'/../qt5
|
||||
include(rpath.pri)
|
||||
|
||||
target.path = /$$GCS_LIBRARY_BASENAME/openpilotgcs
|
||||
}
|
||||
INSTALLS += target
|
||||
|
@ -30,13 +30,9 @@ TARGET = $$qtLibraryName($$TARGET)
|
||||
macx {
|
||||
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Plugins/$${PROVIDER}/
|
||||
} else:linux-* {
|
||||
#do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR
|
||||
QMAKE_RPATHDIR = \$\$ORIGIN
|
||||
QMAKE_RPATHDIR += \$\$ORIGIN/..
|
||||
QMAKE_RPATHDIR += \$\$ORIGIN/../..
|
||||
GCS_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":")
|
||||
QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${GCS_PLUGIN_RPATH}\'
|
||||
QMAKE_RPATHDIR =
|
||||
QMAKE_RPATHDIR = \'\$$ORIGIN\'
|
||||
QMAKE_RPATHDIR += \'\$$ORIGIN\'/../..
|
||||
include(rpath.pri)
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,12 +1,8 @@
|
||||
macx {
|
||||
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Plugins/
|
||||
} else:linux-* {
|
||||
#do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR
|
||||
# this expands to $ORIGIN (after qmake and make), it does NOT read a qmake var
|
||||
QMAKE_RPATHDIR = \$\$ORIGIN/../$$GCS_LIBRARY_BASENAME/openpilotgcs
|
||||
QMAKE_RPATHDIR += \$\$ORIGIN/../$$GCS_LIBRARY_BASENAME/qt5
|
||||
linux {
|
||||
# HACK! Do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR before Qt 5.4
|
||||
# \'\$$ORIGIN\' expands to $ORIGIN (after qmake and make), it does NOT read a qmake var
|
||||
GCS_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":")
|
||||
|
||||
QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${GCS_PLUGIN_RPATH}\'
|
||||
QMAKE_LFLAGS += -Wl,-z,origin,-rpath,$${GCS_PLUGIN_RPATH}
|
||||
QMAKE_RPATHDIR =
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user