support relative paths in configure -R
[ChangeLog][configure][Unix] configure -R now supports paths relative to -libdir. Change-Id: Ie56264a6dedcbaf5577c7ef44b056c8a7870ef48 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
parent
d8be8110a4
commit
adc5c93ddc
@ -160,21 +160,8 @@ qt_module_deps = $$resolve_depends(qt_module_deps, "QT.")
|
|||||||
contains(qt_module_deps, core) {
|
contains(qt_module_deps, core) {
|
||||||
relative_qt_rpath:!isEmpty(QMAKE_REL_RPATH_BASE):contains(INSTALLS, target):\
|
relative_qt_rpath:!isEmpty(QMAKE_REL_RPATH_BASE):contains(INSTALLS, target):\
|
||||||
isEmpty(target.files):isEmpty(target.commands):isEmpty(target.extra) {
|
isEmpty(target.files):isEmpty(target.commands):isEmpty(target.extra) {
|
||||||
mac {
|
|
||||||
if(equals(TEMPLATE, app):app_bundle)|\
|
|
||||||
if(equals(TEMPLATE, lib):plugin:plugin_bundle) {
|
|
||||||
ios: binpath = $$target.path/$${TARGET}.app
|
|
||||||
else: binpath = $$target.path/$${TARGET}.app/Contents/MacOS
|
|
||||||
} else: equals(TEMPLATE, lib):!plugin:lib_bundle {
|
|
||||||
binpath = $$target.path/$${TARGET}.framework/Versions/Current
|
|
||||||
} else {
|
|
||||||
binpath = $$target.path
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
binpath = $$target.path
|
|
||||||
}
|
|
||||||
# NOT the /dev property, as INSTALLS use host paths
|
# NOT the /dev property, as INSTALLS use host paths
|
||||||
QMAKE_RPATHDIR += $$relative_path($$[QT_INSTALL_LIBS], $$binpath)
|
QMAKE_RPATHDIR += $$relative_path($$[QT_INSTALL_LIBS], $$qtRelativeRPathBase())
|
||||||
} else {
|
} else {
|
||||||
QMAKE_RPATHDIR += $$[QT_INSTALL_LIBS/dev]
|
QMAKE_RPATHDIR += $$[QT_INSTALL_LIBS/dev]
|
||||||
}
|
}
|
||||||
|
@ -28,4 +28,13 @@ LIBS += $$EXTRA_LIBS
|
|||||||
# Static libs need no rpaths
|
# Static libs need no rpaths
|
||||||
static: return()
|
static: return()
|
||||||
|
|
||||||
QMAKE_RPATHDIR += $$EXTRA_RPATHS
|
for (rp, EXTRA_RPATHS) {
|
||||||
|
absrp = $$absolute_path($$rp, $$[QT_INSTALL_LIBS])
|
||||||
|
!isEqual(absrp, $$rp) {
|
||||||
|
isEmpty(QMAKE_REL_RPATH_BASE)|!contains(INSTALLS, target): \
|
||||||
|
rp = $$absrp
|
||||||
|
else: \
|
||||||
|
rp = $$relative_path($$absrp, $$qtRelativeRPathBase())
|
||||||
|
}
|
||||||
|
QMAKE_RPATHDIR += $$rp
|
||||||
|
}
|
||||||
|
@ -32,6 +32,19 @@ defineReplace(qt5LibraryTarget) {
|
|||||||
return($$LIBRARY_NAME)
|
return($$LIBRARY_NAME)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defineReplace(qtRelativeRPathBase) {
|
||||||
|
darwin {
|
||||||
|
if(equals(TEMPLATE, app):app_bundle)|\
|
||||||
|
if(equals(TEMPLATE, lib):plugin:plugin_bundle) {
|
||||||
|
ios: return($$target.path/$${TARGET}.app)
|
||||||
|
return($$target.path/$${TARGET}.app/Contents/MacOS)
|
||||||
|
}
|
||||||
|
equals(TEMPLATE, lib):!plugin:lib_bundle: \
|
||||||
|
return($$target.path/$${TARGET}.framework/Versions/Current)
|
||||||
|
}
|
||||||
|
return($$target.path)
|
||||||
|
}
|
||||||
|
|
||||||
defineTest(qtAddLibrary) {
|
defineTest(qtAddLibrary) {
|
||||||
warning("qtAddLibrary() is deprecated. Use QT+= instead.")
|
warning("qtAddLibrary() is deprecated. Use QT+= instead.")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user