summaryrefslogtreecommitdiffstats
path: root/src/macdeployqt/macdeployqt/main.cpp
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@theqtcompany.com>2015-08-26 10:10:55 +0200
committerMorten Johan Sørvig <morten.sorvig@theqtcompany.com>2016-01-13 13:05:33 +0000
commit92a9378328884471861efb117207147cdf201333 (patch)
treedf854c1f27fa079431fe4033dda89cfe5735b75d /src/macdeployqt/macdeployqt/main.cpp
parent7118a9d644674a8bf5522a7e09b6544f2b9a48fc (diff)
macdeployqt: top-level framework deployment
Create frameworks that can be added to Xcode projects. The intention is to improve interop with Swift: The parts of the application that uses Qt can be built as a framework and expose an (objective) C API. Xcode can then link and code sign the framework without needing to know details about the Qt build system and tools (moc, rcc, etc) One (undocumented) feature flag is added: -deploy-framework: enables the framework "fixup" code. Change-Id: I53f2ccb90ec5efb1d58795b03f4b01499b6bdc84 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Diffstat (limited to 'src/macdeployqt/macdeployqt/main.cpp')
-rw-r--r--src/macdeployqt/macdeployqt/main.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/macdeployqt/macdeployqt/main.cpp b/src/macdeployqt/macdeployqt/main.cpp
index 81639f233..97abac2de 100644
--- a/src/macdeployqt/macdeployqt/main.cpp
+++ b/src/macdeployqt/macdeployqt/main.cpp
@@ -96,6 +96,7 @@ int main(int argc, char **argv)
extern bool runCodesign;
extern QString codesignIdentiy;
extern bool appstoreCompliant;
+ extern bool deployFramework;
for (int i = 2; i < argc; ++i) {
QByteArray argument = QByteArray(argv[i]);
@@ -151,13 +152,22 @@ int main(int argc, char **argv)
} else if (argument == QByteArray("-appstore-compliant")) {
LogDebug() << "Argument found:" << argument;
appstoreCompliant = true;
+
+ // Undocumented option, may not work as intented
+ } else if (argument == QByteArray("-deploy-framework")) {
+ LogDebug() << "Argument found:" << argument;
+ deployFramework = true;
+
} else if (argument.startsWith("-")) {
LogError() << "Unknown argument" << argument << "\n";
return 1;
}
}
- DeploymentInfo deploymentInfo = deployQtFrameworks(appBundlePath, additionalExecutables, useDebugLibs);
+ DeploymentInfo deploymentInfo = deployQtFrameworks(appBundlePath, additionalExecutables, useDebugLibs);
+
+ if (deployFramework && deploymentInfo.isFramework)
+ fixupFramework(appBundlePath);
// Convenience: Look for .qml files in the current directoty if no -qmldir specified.
if (qmlDirs.isEmpty()) {