From aae7a5e09db3d98ce74a523c06b8971a3672b309 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Mon, 15 Feb 2016 22:29:01 -0800 Subject: 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 --- qmake/generators/unix/unixmake.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'qmake/generators/unix/unixmake.cpp') diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index b0f7593fbe..0e29f469ef 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -579,10 +579,13 @@ UnixMakefileGenerator::defaultInstall(const QString &t) plain_targ = escapeFilePath(plain_targ); if (bundle != NoBundle) { QString suffix; - if (project->first("TEMPLATE") == "lib") - suffix = "/Versions/" + project->first("QMAKE_FRAMEWORK_VERSION") + "/$(TARGET)"; - else + if (project->first("TEMPLATE") == "lib") { + if (!project->isActiveConfig("shallow_bundle")) + suffix += "/Versions/" + project->first("QMAKE_FRAMEWORK_VERSION"); + suffix += "/$(TARGET)"; + } else { suffix = "/" + project->first("QMAKE_BUNDLE_LOCATION") + "/$(QMAKE_TARGET)"; + } dst_targ += suffix; if (bundle == SolidBundle) { if (!ret.isEmpty()) -- cgit v1.2.3