1################################################################################
2#  THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY  #
3#  Read the zproject/README.md for information about making permanent changes. #
4################################################################################
5
6TEMPLATE = lib
7
8CONFIG += plugin
9QT += qml quick
10
11TARGET = $$qtLibraryTarget(qml_zyre)
12uri = QmlZyre
13
14DESTDIR   = $$[QT_INSTALL_QML]/$$replace(uri, \., /)
15SRCDIR    = $$PWD/src
16BUILDDIR  = $$PWD/build/native
17
18android {
19  # Use a default value assuming the zyre project sits outside this one
20  isEmpty(ZYRE_ROOT) {
21    ZYRE_ROOT = $$clean_path($$PWD/../..)
22  }
23  !exists($$ZYRE_ROOT) {
24    error(The ZYRE_ROOT directory does not exist: $$ZYRE_ROOT)
25  }
26  # Build the zyre library for android unless it is already built
27  !system(bash $$ZYRE_ROOT/builds/android/build.sh) {
28    error(Failed to build the zyre library with $$ZYRE_ROOT/builds/android/build.sh)
29  }
30
31  VENDOR_PREFIX = $$ZYRE_ROOT/builds/android/prefix/$(TOOLCHAIN_NAME)
32  BUILDDIR  = $$PWD/build/$(TOOLCHAIN_NAME)
33  QMAKE_LIBDIR += $$VENDOR_PREFIX/lib
34  QMAKE_INCDIR += $$VENDOR_PREFIX/include
35}
36
37LIBS += -lzyre
38
39HEADERS += \
40  $$SRCDIR/qml_zyre_plugin.h \
41  $$SRCDIR/QmlZyre.h \
42  $$SRCDIR/QmlZyreEvent.h
43
44SOURCES += \
45  $$SRCDIR/QmlZyre.cpp \
46  $$SRCDIR/QmlZyreEvent.cpp
47
48OBJECTS_DIR = $$BUILDDIR/.obj
49MOC_DIR     = $$BUILDDIR/.moc
50RCC_DIR     = $$BUILDDIR/.rcc
51UI_DIR      = $$BUILDDIR/.ui
52
53target.path  = $$DESTDIR
54qmldir.files = $$PWD/qmldir
55qmldir.path  = $$DESTDIR
56
57OTHER_FILES += $$SRCDIR/qmldir \
58               $$SRCDIR/qml/*
59#*/
60
61INSTALLS    += target qmldir
62
63# Copy the qmldir file to the same folder as the plugin binary
64QMAKE_POST_LINK += \
65  $$QMAKE_COPY $$replace($$list($$quote($$SRCDIR/qmldir) $$DESTDIR), /, $$QMAKE_DIR_SEP)
66
67# Copy the dependency shared libraries to the plugin folder (on android only)
68android {
69  QMAKE_POST_LINK += \
70  && $$QMAKE_COPY $$replace($$list($$quote($$VENDOR_PREFIX/lib/*.so)  $$DESTDIR), /, $$QMAKE_DIR_SEP)
71}
72#*/
73
74# Copy the qml implementation directory to the plugin folder
75copyqml.commands = $(COPY_DIR) $$SRCDIR/qml $$DESTDIR
76first.depends = $(first) copyqml
77export(first.depends)
78export(copyqml.commands)
79QMAKE_EXTRA_TARGETS += first copyqml
80
81################################################################################
82#  THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY  #
83#  Read the zproject/README.md for information about making permanent changes. #
84################################################################################
85