diff options
author | Jake Petroules <jake.petroules@qt.io> | 2016-02-15 22:29:01 -0800 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2016-08-25 10:55:31 +0000 |
commit | aae7a5e09db3d98ce74a523c06b8971a3672b309 (patch) | |
tree | e7eb9028f11972c97e1725344764f686a10472bb /mkspecs | |
parent | e9f0766d12367e7f853901f0e2721ef702555685 (diff) |
qmake: Add shallow bundle support
This is a prerequisite for properly constructed framework bundles.
On certain Apple platforms (iOS, tvOS, watchOS), bundles are used
in "shallow" format, meaning that the directory structures are
flattened compared to the one used in macOS bundles.
shallow_bundle allows the difference to be expressed independently
of the platform. Note that the term "shallow bundle" is used by
Apple in Xcode internals.
Change-Id: I1189c52b0ea66843c313783176c11cc2af97ad25
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/common/uikit.conf | 2 | ||||
-rw-r--r-- | mkspecs/features/qt.prf | 4 | ||||
-rw-r--r-- | mkspecs/features/qt_functions.prf | 6 |
3 files changed, 7 insertions, 5 deletions
diff --git a/mkspecs/common/uikit.conf b/mkspecs/common/uikit.conf index edc0eddf00..6ffbe51fce 100644 --- a/mkspecs/common/uikit.conf +++ b/mkspecs/common/uikit.conf @@ -3,7 +3,7 @@ # QMAKE_PLATFORM += uikit -CONFIG += bitcode reduce_exports +CONFIG += bitcode reduce_exports shallow_bundle INCLUDEPATH += $$PWD/uikit DEFINES += DARWIN_NO_CARBON QT_NO_PRINTER QT_NO_PRINTDIALOG diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf index 0c5f080ec1..7b669b902f 100644 --- a/mkspecs/features/qt.prf +++ b/mkspecs/features/qt.prf @@ -244,13 +244,13 @@ contains(qt_module_deps, qml): \ # copy qml files. this part is platform spesific. mac { - osx { + !shallow_bundle { # Note: user can override QMAKE_BUNDLE_QML from pro file to change target bundle path isEmpty(QMAKE_QML_BUNDLE_PATH):QMAKE_QML_BUNDLE_PATH = "Resources/qt_qml" qmlTargetPath = $$OUT_PWD/$${TARGET}.app/Contents/$$QMAKE_QML_BUNDLE_PATH qtconfTargetPath = $$OUT_PWD/$${TARGET}.app/Contents/Resources/qt.conf } else { - # iOS: flat bundle layout (no Contents/Resources) + # shallow bundle layout (no Contents/Resources) isEmpty(QMAKE_QML_BUNDLE_PATH):QMAKE_QML_BUNDLE_PATH = "qt_qml" qmlTargetPath = $CODESIGNING_FOLDER_PATH/$$QMAKE_QML_BUNDLE_PATH qtconfTargetPath = $CODESIGNING_FOLDER_PATH/qt.conf diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 08c7c9f899..e7d73adefb 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -37,11 +37,13 @@ defineReplace(qtRelativeRPathBase) { darwin { if(equals(TEMPLATE, app):app_bundle)|\ if(equals(TEMPLATE, lib):plugin:plugin_bundle) { - ios: return($$target.path/$${TARGET}.app) + shallow_bundle: return($$target.path/$${TARGET}.app) return($$target.path/$${TARGET}.app/Contents/MacOS) } - equals(TEMPLATE, lib):!plugin:lib_bundle: \ + equals(TEMPLATE, lib):!plugin:lib_bundle { + shallow_bundle: return($$target.path/$${TARGET}.framework) return($$target.path/$${TARGET}.framework/Versions/Current) + } } return($$target.path) } |