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 \
|
SOURCES += main.cpp \
|
||||||
gcssplashscreen.cpp
|
gcssplashscreen.cpp
|
||||||
|
|
||||||
include(../rpath.pri)
|
|
||||||
include(../libs/utils/utils.pri)
|
include(../libs/utils/utils.pri)
|
||||||
include(../libs/version_info/version_info.pri)
|
include(../libs/version_info/version_info.pri)
|
||||||
|
|
||||||
@ -27,9 +26,13 @@ win32 {
|
|||||||
FILETYPES.files = profile.icns prifile.icns
|
FILETYPES.files = profile.icns prifile.icns
|
||||||
FILETYPES.path = Contents/Resources
|
FILETYPES.path = Contents/Resources
|
||||||
QMAKE_BUNDLE_DATA += FILETYPES
|
QMAKE_BUNDLE_DATA += FILETYPES
|
||||||
|
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Plugins/
|
||||||
} else {
|
} else {
|
||||||
target.path = /bin
|
target.path = /bin
|
||||||
INSTALLS += target
|
INSTALLS += target
|
||||||
|
QMAKE_RPATHDIR = \'\$$ORIGIN\'/../$$GCS_LIBRARY_BASENAME/openpilotgcs
|
||||||
|
QMAKE_RPATHDIR += \'\$$ORIGIN\'/../$$GCS_LIBRARY_BASENAME/qt5
|
||||||
|
include(../rpath.pri)
|
||||||
}
|
}
|
||||||
|
|
||||||
OTHER_FILES += openpilotgcs.rc
|
OTHER_FILES += openpilotgcs.rc
|
||||||
|
@ -6,17 +6,21 @@ win32 {
|
|||||||
|
|
||||||
DESTDIR = $$GCS_LIBRARY_PATH
|
DESTDIR = $$GCS_LIBRARY_PATH
|
||||||
|
|
||||||
include(rpath.pri)
|
|
||||||
|
|
||||||
TARGET = $$qtLibraryName($$TARGET)
|
TARGET = $$qtLibraryName($$TARGET)
|
||||||
|
|
||||||
contains(QT_CONFIG, reduce_exports):CONFIG += hGCS_symbols
|
contains(QT_CONFIG, reduce_exports):CONFIG += hGCS_symbols
|
||||||
|
|
||||||
!macx {
|
macx {
|
||||||
|
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Plugins/
|
||||||
|
} else
|
||||||
win32 {
|
win32 {
|
||||||
target.path = /bin
|
target.path = /bin
|
||||||
target.files = $$DESTDIR/$${TARGET}.dll
|
target.files = $$DESTDIR/$${TARGET}.dll
|
||||||
} else {
|
} else {
|
||||||
|
QMAKE_RPATHDIR = \'\$$ORIGIN\'
|
||||||
|
QMAKE_RPATHDIR += \'\$$ORIGIN\'/../qt5
|
||||||
|
include(rpath.pri)
|
||||||
|
|
||||||
target.path = /$$GCS_LIBRARY_BASENAME/openpilotgcs
|
target.path = /$$GCS_LIBRARY_BASENAME/openpilotgcs
|
||||||
}
|
}
|
||||||
INSTALLS += target
|
INSTALLS += target
|
||||||
|
@ -30,13 +30,9 @@ TARGET = $$qtLibraryName($$TARGET)
|
|||||||
macx {
|
macx {
|
||||||
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Plugins/$${PROVIDER}/
|
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Plugins/$${PROVIDER}/
|
||||||
} else:linux-* {
|
} 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\'/../..
|
||||||
QMAKE_RPATHDIR += \$\$ORIGIN/..
|
include(rpath.pri)
|
||||||
QMAKE_RPATHDIR += \$\$ORIGIN/../..
|
|
||||||
GCS_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":")
|
|
||||||
QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${GCS_PLUGIN_RPATH}\'
|
|
||||||
QMAKE_RPATHDIR =
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,12 +1,8 @@
|
|||||||
macx {
|
linux {
|
||||||
QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Plugins/
|
# HACK! Do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR before Qt 5.4
|
||||||
} else:linux-* {
|
# \'\$$ORIGIN\' expands to $ORIGIN (after qmake and make), it does NOT read a qmake var
|
||||||
#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
|
|
||||||
GCS_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":")
|
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 =
|
QMAKE_RPATHDIR =
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user