Commit 815a84a7 authored by Björn Stresing's avatar Björn Stresing Committed by Aleix Pol Gonzalez

Pass the android toolchain file path to CMake as a local file path not as a URI

Summary: BUG: 395763

Reviewers: apol

Reviewed By: apol

Subscribers: kdevelop-devel

Tags: #kdevelop

Differential Revision: https://phabricator.kde.org/D21936
parent ea0f0e53
......@@ -22,7 +22,11 @@
</widget>
</item>
<item row="2" column="1">
<widget class="KUrlRequester" name="kcfg_cmakeToolchain"/>
<widget class="KUrlRequester" name="kcfg_cmakeToolchain">
<property name="mode">
<set>KFile::File|KFile::ExistingOnly|KFile::LocalOnly</set>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_2">
......@@ -32,7 +36,11 @@
</widget>
</item>
<item row="3" column="1">
<widget class="KUrlRequester" name="kcfg_ndk"/>
<widget class="KUrlRequester" name="kcfg_ndk">
<property name="mode">
<set>KFile::Directory|KFile::ExistingOnly|KFile::LocalOnly</set>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_3">
......@@ -42,7 +50,11 @@
</widget>
</item>
<item row="4" column="1">
<widget class="KUrlRequester" name="kcfg_sdk"/>
<widget class="KUrlRequester" name="kcfg_sdk">
<property name="mode">
<set>KFile::Directory|KFile::ExistingOnly|KFile::LocalOnly</set>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_4">
......
......@@ -22,6 +22,7 @@
#include <KProcess>
#include <QProcess>
#include <QUrl>
using namespace KDevelop;
......@@ -43,8 +44,8 @@ void AndroidRuntime::setEnabled(bool /*enable*/)
static void setEnvironmentVariables(QProcess* process)
{
auto env = process->processEnvironment();
env.insert(QStringLiteral("ANDROID_NDK"), AndroidRuntime::s_settings->ndk());
env.insert(QStringLiteral("ANDROID_SDK_ROOT"), AndroidRuntime::s_settings->sdk());
env.insert(QStringLiteral("ANDROID_NDK"), QUrl(AndroidRuntime::s_settings->ndk()).toLocalFile());
env.insert(QStringLiteral("ANDROID_SDK_ROOT"), QUrl(AndroidRuntime::s_settings->sdk()).toLocalFile());
process->setProcessEnvironment(env);
}
......@@ -52,10 +53,9 @@ static void setEnvironmentVariables(QProcess* process)
static QStringList args()
{
return {
QLatin1String("-DCMAKE_TOOLCHAIN_FILE=") + AndroidRuntime::s_settings->cmakeToolchain(),
QLatin1String("-DCMAKE_TOOLCHAIN_FILE=") + QUrl(AndroidRuntime::s_settings->cmakeToolchain()).toLocalFile(),
QLatin1String("-DANDROID_ABI=") + AndroidRuntime::s_settings->abi(),
QLatin1String("-DANDROID_NDK=") + AndroidRuntime::s_settings->ndk(),
QLatin1String("-DANDROID_NDK=") + QUrl(AndroidRuntime::s_settings->ndk()).toLocalFile(),
QLatin1String("-DANDROID_TOOLCHAIN=") + AndroidRuntime::s_settings->toolchain(),
QLatin1String("-DANDROID_API_LEVEL=") + AndroidRuntime::s_settings->api(),
QLatin1String("-DANDROID_ARCHITECTURE=") + AndroidRuntime::s_settings->arch(),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment