Build Qt for OS X and iOS with relative rpath.
Defaulting to absolute_library_soname on configure -rpath is no longer necessary as now we support @rpath install name ids on OS X and iOS. This also sets QMAKE_SONAME_PREFIX to @rpath for Qt modules when built with rpath configuration. This makes Qt libraries relocatable on OS X. Qt SDK is not yet relocatable though, because plugin locations (including cocoa plugin) are still resolved using absolute path (see QTBUG-14150). Also, there are several absolute paths hardcoded in qmake mkspecs pri files. Task-number: QTBUG-31814 Change-Id: I36b9384cd69ac609608acbe2b3d5e0512317e0d6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This commit is contained in:
parent
af6c52522b
commit
6e18f57a9c
6
configure
vendored
6
configure
vendored
@ -6205,11 +6205,7 @@ fi
|
||||
[ '!' -z "$INCLUDES" ] && QMakeVar add INCLUDEPATH "$INCLUDES"
|
||||
[ '!' -z "$L_FLAGS" ] && QMakeVar add LIBS "$L_FLAGS"
|
||||
|
||||
if [ "$XPLATFORM_MAC" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then
|
||||
if [ "$CFG_RPATH" = "yes" ]; then
|
||||
QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
|
||||
fi
|
||||
elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
|
||||
if [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
|
||||
if [ -n "$RPATH_FLAGS" ]; then
|
||||
echo
|
||||
echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
|
||||
|
@ -52,12 +52,6 @@ QMAKE_DIR_REPLACE_SANE = PRECOMPILED_DIR OBJECTS_DIR MOC_DIR RCC_DIR UI_DIR
|
||||
unset(modpath)
|
||||
}
|
||||
|
||||
mac {
|
||||
!isEmpty(QMAKE_RPATHDIR){
|
||||
CONFIG += absolute_library_soname
|
||||
}
|
||||
}
|
||||
|
||||
cross_compile: \
|
||||
CONFIG += force_bootstrap
|
||||
|
||||
|
@ -132,6 +132,9 @@ mac {
|
||||
QMAKE_CFLAGS += -fconstant-cfstrings
|
||||
QMAKE_CXXFLAGS += -fconstant-cfstrings
|
||||
}
|
||||
|
||||
contains(QT_CONFIG, rpath): \
|
||||
QMAKE_SONAME_PREFIX = @rpath
|
||||
}
|
||||
|
||||
DEFINES += QT_BUILDING_QT
|
||||
|
Loading…
Reference in New Issue
Block a user