summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2016-02-16 14:29:59 +0000
committerJake Petroules <jake.petroules@qt.io>2016-05-17 16:11:23 +0000
commit03e9c6f4a62582837fc9f5961ecbccd0a3d1b5d6 (patch)
treec52961c92f5968a7355941fa224dfc74268ce150 /qmake
parent26d44fce3dfb9dbd3b5be2a031fff8c1bb903960 (diff)
Add support for Apple tvOS
Pass -xplatform macx-tvos-clang to configure to build. Builds device and simulator by default. Added ‘uikit’ platform with the common setup. Also added QT_PLATFORM_UIKIT define (undocumented). qmake config defines tvos (but not ios). tvOS is 64bits only (QT_ARCH is arm64) and requires bitcode to be embedded in the binary. A new ‘bitcode’ configuration was added. For ReleaseDevice builds (which get archived and push to the store), bitcode is actually embedded (-fembed-bitcode passed to clang). For all other configurations, only using bitcode markers to keep file size down (-fembed-bitcode-marker). Build disables Widgets in qtbase, and qtscript (unsupported, would require fixes to JavaScriptCore source code). Qpa same as on iOS but disables device orientation, status bar, clipboard, menus, dialogs which are not supported on tvOS. Change-Id: I645804fd933be0befddeeb43095a74d2c178b2ba Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/doc/src/qmake-manual.qdoc24
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp16
2 files changed, 20 insertions, 20 deletions
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc
index 77026bb479..5c6afcf191 100644
--- a/qmake/doc/src/qmake-manual.qdoc
+++ b/qmake/doc/src/qmake-manual.qdoc
@@ -657,7 +657,7 @@
qmake knows about many of these features, which can be accessed via specific
variables that only take effect on the platforms where they are relevant.
- \section1 OS X and iOS
+ \section1 OS X, iOS and tvOS
Features specific to these platforms include support for creating universal
binaries, frameworks and bundles.
@@ -1439,7 +1439,7 @@
\target QMAKE_BUNDLE_DATA
\section1 QMAKE_BUNDLE_DATA
- \note This variable is used on OS X and iOS only.
+ \note This variable is used on OS X, iOS and tvOS only.
Specifies the data that will be installed with a library
bundle, and is often used to specify a collection of header files.
@@ -1461,7 +1461,7 @@
\section1 QMAKE_BUNDLE_EXTENSION
- \note This variable is used on OS X and iOS only.
+ \note This variable is used on OS X, iOS and tvOS only.
Specifies the extension to be used for library bundles.
This allows frameworks to be created with custom extensions instead of the
@@ -1688,7 +1688,7 @@
\section1 QMAKE_FRAMEWORK_BUNDLE_NAME
- \note This variable is used on OS X and iOS only.
+ \note This variable is used on OS X, iOS and tvOS only.
In a framework project, this variable contains the name to be used for the
framework that is built.
@@ -1702,11 +1702,11 @@
\target QMAKE_FRAMEWORK_VERSION
\section1 QMAKE_FRAMEWORK_VERSION
- \note This variable is used on OS X and iOS only.
+ \note This variable is used on OS X, iOS and tvOS only.
- For projects where the build target is an OS X or iOS framework, this variable
- is used to specify the version number that will be applied to the framework
- that is built.
+ For projects where the build target is an OS X, iOS or tvOS framework, this
+ variable is used to specify the version number that will be applied to the
+ framework that is built.
By default, this variable contains the same value as the \l{#VERSION}{VERSION}
variable.
@@ -1797,10 +1797,10 @@
\target QMAKE_INFO_PLIST
\section1 QMAKE_INFO_PLIST
- \note This variable is used on OS X and iOS platforms only.
+ \note This variable is used on OS X, iOS and tvOS platforms only.
Specifies the name of the property list file, \c{.plist}, you
- would like to include in your OS X and iOS application bundle.
+ would like to include in your OS X, iOS and tvOS application bundle.
In the \c{.plist} file, you can define some variables, e.g., @EXECUTABLE@,
which qmake will replace with the actual executable name. Other variables
@@ -2158,7 +2158,7 @@
the built shared library's \c SONAME identifier. The \c SONAME is the
identifier that the dynamic linker will later use to reference the library.
In general this reference may be a library name or full library path. On OS
- X and iOS, the path may be specified relatively using the following
+ X, iOS and tvOS, the path may be specified relatively using the following
placeholders:
\table
@@ -4301,7 +4301,7 @@
\li nmake
\li Visual Studio projects (VS 2008 and later)
\endlist
- \li OS X and iOS
+ \li OS X, iOS and tvOS
\list
\li Makefile
\li Xcode
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index 147c03a92d..47c7826154 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -1089,7 +1089,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
// Copy Bundle Data
if (!project->isEmpty("QMAKE_BUNDLE_DATA")) {
ProStringList bundle_file_refs;
- bool ios = project->isActiveConfig("ios");
+ bool osx = project->isActiveConfig("osx");
//all bundle data
const ProStringList &bundle_data = project->values("QMAKE_BUNDLE_DATA");
@@ -1117,8 +1117,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
<< "\t\t};\n";
}
- if (copyBundleResources && ((ios && path.isEmpty())
- || (!ios && path == QLatin1String("Contents/Resources")))) {
+ if (copyBundleResources && ((!osx && path.isEmpty())
+ || (osx && path == QLatin1String("Contents/Resources")))) {
for (const ProString &s : qAsConst(bundle_files))
bundle_resources_files << s;
} else {
@@ -1336,7 +1336,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
ProString targetName = project->first("QMAKE_ORIG_TARGET");
ProString testHost = "$(BUILT_PRODUCTS_DIR)/" + targetName + ".app/";
- if (!project->isActiveConfig("ios"))
+ if (project->isActiveConfig("osx"))
testHost.append("Contents/MacOS/");
testHost.append(targetName);
@@ -1404,10 +1404,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
QMap<QString, QString> settings;
settings.insert("COPY_PHASE_STRIP", (as_release ? "YES" : "NO"));
- // Bitcode is only supported with a deployment target >= iOS 6.0.
- // Disable it for now, and consider switching it on when later
- // bumping the deployment target.
- settings.insert("ENABLE_BITCODE", "NO");
+ // required for tvOS (and watchos), optional on iOS (deployment target >= iOS 6.0)
+ settings.insert("ENABLE_BITCODE", project->isActiveConfig("bitcode") ? "YES" : "NO");
settings.insert("GCC_GENERATE_DEBUGGING_SYMBOLS", as_release ? "NO" : "YES");
if(!as_release)
settings.insert("GCC_OPTIMIZATION_LEVEL", "0");
@@ -1537,6 +1535,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
t << "\t\t\t\t" << writeSettings("MACOSX_DEPLOYMENT_TARGET", project->first("QMAKE_MACOSX_DEPLOYMENT_TARGET")) << ";\n";
if (!project->isEmpty("QMAKE_IOS_DEPLOYMENT_TARGET"))
t << "\t\t\t\t" << writeSettings("IPHONEOS_DEPLOYMENT_TARGET", project->first("QMAKE_IOS_DEPLOYMENT_TARGET")) << ";\n";
+ if (!project->isEmpty("QMAKE_TVOS_DEPLOYMENT_TARGET"))
+ t << "\t\t\t\t" << writeSettings("APPLETVOS_DEPLOYMENT_TARGET", project->first("QMAKE_TVOS_DEPLOYMENT_TARGET")) << ";\n";
if (!project->isEmpty("QMAKE_XCODE_CODE_SIGN_IDENTITY"))
t << "\t\t\t\t" << writeSettings("CODE_SIGN_IDENTITY", project->first("QMAKE_XCODE_CODE_SIGN_IDENTITY")) << ";\n";