Provide better QMAKE_RPATHDIR defaults on Apple platforms

Now QMAKE_RPATHDIR also includes @executable_path and @loader_path
on Apple platforms, and omits any others on iOS, tvOS, and watchOS
since they can't use paths outside the application bundle.

Change-Id: Ia8f76ebcddd51f44eca482a51ce1710369c8df10
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
Jake Petroules 2016-05-28 02:13:34 -07:00
parent f510a51dac
commit f777b1ae48
2 changed files with 8 additions and 1 deletions

View File

@ -3,7 +3,7 @@
#
QMAKE_PLATFORM += uikit
CONFIG += bitcode reduce_exports shallow_bundle
CONFIG += bitcode reduce_exports shallow_bundle no_qt_rpath
INCLUDEPATH += $$PWD/uikit
DEFINES += DARWIN_NO_CARBON QT_NO_PRINTER QT_NO_PRINTDIALOG

View File

@ -24,6 +24,13 @@ qt {
}
}
# Add the same default rpaths as Xcode does for new projects.
# This is especially important for iOS/tvOS/watchOS where no other option is possible.
!no_default_rpath {
QMAKE_RPATHDIR += @executable_path/Frameworks
equals(TEMPLATE, lib):!plugin:lib_bundle: QMAKE_RPATHDIR += @loader_path/Frameworks
}
macx-xcode:!isEmpty(QMAKE_XCODE_DEBUG_INFORMATION_FORMAT) {
debug_information_format.name = DEBUG_INFORMATION_FORMAT
debug_information_format.value = $$QMAKE_XCODE_DEBUG_INFORMATION_FORMAT