Set QMLEngine base path for android

This commit is contained in:
Gabriel Calero 2018-01-03 22:13:31 -03:00
parent 3d86c24b34
commit 32494a8e24
2 changed files with 4 additions and 2 deletions

View file

@ -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()

View file

@ -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/";