From 32494a8e2425beec8c7fde400da91780c5249f41 Mon Sep 17 00:00:00 2001
From: Gabriel Calero <gcalero1984@gmail.com>
Date: Wed, 3 Jan 2018 22:13:31 -0300
Subject: [PATCH] Set QMLEngine base path for android

---
 interface/CMakeLists.txt           | 2 +-
 libraries/shared/src/PathUtils.cpp | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt
index cba8ce5479..23358092ca 100644
--- a/interface/CMakeLists.txt
+++ b/interface/CMakeLists.txt
@@ -12,7 +12,7 @@ function(JOIN VALUES GLUE OUTPUT)
 endfunction()
 
 
-if (NOT DEV_BUILD)
+if ANDROID OR (NOT DEV_BUILD)
     set(INTERFACE_QML_QRC ${CMAKE_CURRENT_BINARY_DIR}/qml.qrc)
     generate_qrc(OUTPUT ${INTERFACE_QML_QRC} PATH ${CMAKE_CURRENT_SOURCE_DIR}/resources GLOBS *.qml *.qss *.js *.html *.ttf *.gif *.svg *.png *.jpg)
 endif()      
diff --git a/libraries/shared/src/PathUtils.cpp b/libraries/shared/src/PathUtils.cpp
index c6ff73492c..cf33cbed2b 100644
--- a/libraries/shared/src/PathUtils.cpp
+++ b/libraries/shared/src/PathUtils.cpp
@@ -53,7 +53,9 @@ const QString& PathUtils::projectRootPath() {
 #endif
 
 const QString& PathUtils::qmlBasePath() {
-#ifdef DEV_BUILD
+#ifdef Q_OS_ANDROID
+    static const QString staticResourcePath = QUrl::fromLocalFile(PathUtils::resourcesPath() + "qml/").toString();
+#elif defined (DEV_BUILD)
     static const QString staticResourcePath = QUrl::fromLocalFile(projectRootPath() + "/interface/resources/qml/").toString();
 #else
     static const QString staticResourcePath = "qrc:///qml/";