From c0a54efc4091b365ffac09fc2827cf92f849d698 Mon Sep 17 00:00:00 2001 From: Adam Strzelecki Date: Wed, 6 Aug 2014 18:54:03 +0200 Subject: 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 location (including cocoa plugin) is 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: Ie9dffefcd2a946c1580293d433621c1adb7e06c4 Reviewed-by: Jake Petroules --- mkspecs/features/qt_build_config.prf | 6 ------ mkspecs/features/qt_module.prf | 3 +++ 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'mkspecs') diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf index 42046c238a..7197f84c9a 100644 --- a/mkspecs/features/qt_build_config.prf +++ b/mkspecs/features/qt_build_config.prf @@ -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 diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 8599a47ecd..7d47caef46 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -111,6 +111,9 @@ mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) { } } +mac:contains(QT_CONFIG, rpath): \ + QMAKE_SONAME_PREFIX = @rpath + mac { CONFIG += explicitlib macx-g++ { -- cgit v1.2.3