Say hello to Android CMake support

Requirements:
 - NDKr19 or newer
 - Qt 5.12.1 or newer

QtCreator supports the following variables:
 - ANDROID_PACKAGE_SOURCE_DIR
 - ANDROID_EXTRA_LIBS

Be aware, that there is a lot of magic done on QtCreator side, and you
can't use only cmake to build an Android APK.

[ChangeLog][Android][CMake] Add Android support for CMake projects.

Change-Id: I1d351976ed56f424c2bc972f4ff7b5968147a2ed
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
BogDan Vatra
2019-03-06 14:17:17 +02:00
parent a8ebc37da2
commit 26463a2219
15 changed files with 327 additions and 22 deletions

View File

@@ -87,7 +87,7 @@ public:
static int minimumSDK(ProjectExplorer::Target *target);
static int minimumSDK(const ProjectExplorer::Kit *kit);
static QString targetArch(ProjectExplorer::Target *target);
static QString targetArch(const ProjectExplorer::Target *target);
static Utils::FileName dirPath(const ProjectExplorer::Target *target);
static Utils::FileName manifestPath(ProjectExplorer::Target *target);
@@ -114,6 +114,8 @@ public:
int timeoutS = 30);
static SdkToolResult runAaptCommand(const QStringList &args, int timeoutS = 30);
static QJsonObject deploymentSettings(const ProjectExplorer::Target *target);
private:
static SdkToolResult runCommand(const QString &executable, const QStringList &args,
const QByteArray &writeData = {}, int timeoutS = 30);