1

I have QML extention plagin created by Qt Creator wizard. When I try to compile it for Android, compilation fails with message:

mingw32-make[1]: Entering directory 'F:/work/app-project/build-app-Android_for_armeabi_GCC_4_8_Qt_5_3_1-Debug/extention'
mingw32-make[1]: *** No rule to make target 'F:\work\app-project\build-app-Android_for_armeabi_GCC_4_8_Qt_5_3_1-Debug\extention\qmldir', needed by 'libextention.so'. Stop.

What is wrong with extention .pro file? Host OS - Windows 7, Qt - 5.3.1

TEMPLATE = lib
TARGET = extention
QT += qml quick declarative
CONFIG += qt plugin

TARGET = $$qtLibraryTarget($$TARGET)
uri = com.example.extention

# Input
SOURCES += \
    Plugin.cpp \
    extention.cpp

HEADERS += \
    Plugin.h \
    extention.h


OTHER_FILES = qmldir

!equals(_PRO_FILE_PWD_, $$OUT_PWD) {
    copy_qmldir.target = $$OUT_PWD/qmldir
    copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir
    copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\"
    QMAKE_EXTRA_TARGETS += copy_qmldir
    PRE_TARGETDEPS += $$copy_qmldir.target
}

qmldir.files = qmldir
unix {
    installPath = $$[QT_INSTALL_QML]/$$replace(uri, \\., /)
    qmldir.path = $$installPath
    target.path = $$installPath
    INSTALLS += target qmldir
}
BaCaRoZzo
  • 7,502
  • 6
  • 51
  • 82
Bernd Jacobi
  • 571
  • 2
  • 5
  • 18
  • Hi. I have the exact same problem, but nobody seems to have answered this question. Can you post a solution as an answer here if you have one ? – Félix Cantournet Sep 30 '14 at 13:34
  • There is a solution to build binaries into source dir, not to different dir. Sorry, I forget exact terminology. – Bernd Jacobi Oct 06 '14 at 16:14

1 Answers1

0

Use QRC instead of copying .qml-files to your build directory. Qt will handle all system-dependent problems for you.

Simon Warta
  • 10,850
  • 5
  • 40
  • 78