diff options
author | Andrew Knight <andrew.knight@intopalo.com> | 2016-03-11 13:05:25 +0200 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2016-11-25 20:27:59 +0000 |
commit | 84d3ffa171feb3d31d311e2db8f0965f0d7e9f7d (patch) | |
tree | 5b346dcb8bb275d78a4d5f04b5ecd383474b322f | |
parent | 83325ac2948b22623d833353fd1c5c7ecd2bae80 (diff) |
Fix Qt 5.6+ main() support for iOS and tvOS
Don't link to qtmn in Qt 5.6; in that version it has been superseded by
setting the entry point to _qt_main_wrapper.
Change-Id: I9941f7347ffbe530550430ce93e1867edbc0985a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r-- | src/lib/qtprofilesetup/templates/core.qbs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/qtprofilesetup/templates/core.qbs b/src/lib/qtprofilesetup/templates/core.qbs index 7d9eda360..ba84ead91 100644 --- a/src/lib/qtprofilesetup/templates/core.qbs +++ b/src/lib/qtprofilesetup/templates/core.qbs @@ -81,6 +81,10 @@ Module { property string qmBaseName: product.targetName property bool lreleaseMultiplexMode: false + cpp.entryPoint: qbs.targetOS.containsAny(["ios", "tvos"]) + && Utilities.versionCompare(version, "5.6.0") >= 0 + ? "_qt_main_wrapper" + : undefined cpp.cxxLanguageVersion: Utilities.versionCompare(version, "5.7.0") >= 0 ? "c++11" : original cpp.defines: { var defines = @defines@; @@ -88,9 +92,12 @@ Module { // from the build variant "release" if (!qbs.debugInformation) defines.push("QT_NO_DEBUG"); - if (qbs.targetOS.contains("ios")) + if (qbs.targetOS.containsAny(["ios", "tvos"])) { defines = defines.concat(["DARWIN_NO_CARBON", "QT_NO_CORESERVICES", "QT_NO_PRINTER", - "QT_NO_PRINTDIALOG", "main=qtmn"]); + "QT_NO_PRINTDIALOG"]); + if (Utilities.versionCompare(version, "5.6.0") < 0) + defines.push("main=qtmn"); + } return defines; } cpp.includePaths: { |