TEMPLATE = lib TARGET = netinterfaces QT += qml CONFIG += qt plugin c++11 PDUMP="/home/wrk/Qt5.7.0/5.7/gcc_64/bin/qmlplugindump" VERSION=1.0 PDUMPFILE=net.qmltypes IMPORTPATH="/home/wrk/Qt5.7.0/5.7/gcc_64/qml" URI = gfa.plugins.qml.net QMAKE_LIBDIR += $$[QT_SYSROOT]/usr/lib/gfa QMAKE_RPATHLINKDIR += $$[QT_SYSROOT]/usr/lib/gfa QMAKE_RPATHDIR += /usr/lib/gfa QMAKE_DEL_DIR = rmdir --ignore-fail-on-non-empty CONFIG(debug, debug|release) { QMAKE_CXXFLAGS -= -Os QMAKE_CFLAGS -= -Os QMAKE_CXXFLAGS += -D_DEBUG QMAKE_CFLAGS += -D_DEBUG QMAKE_LIBS += -lgfanetd -lgfaipc } CONFIG(release, debug|release) { QMAKE_LIBS += -lgfanet -lgfaipc } SOURCES += \ netinterfaces.cpp \ netinterfaces_plugin.cpp HEADERS += \ netinterfaces.h \ netinterfaces_plugin.h 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 installPath = $$[QT_INSTALL_QML]/$$replace(URI, \\., /) USER_GROUP = $$system(stat -c "%U:%G" $$[QT_INSTALL_QML]) qmldir.path = $$installPath qmldir.extra += -$(INSTALL_FILE) qmldir $$installPath qmldir.uninstall += -$(DEL_FILE) $$installPath/qmldir pdump.path = $$installPath linux-g++ { pdump.extra += "$$PDUMP" -v "$$URI" "$$VERSION" "$$IMPORTPATH" > "$$installPath/$$PDUMPFILE" } pdump.extra += $$escape_expand(\\n\\t)chown -R $$USER_GROUP $$installPath linux-g++ { pdump.uninstall += -$(DEL_FILE) $$installPath/$$PDUMPFILE } target.path = $$installPath INSTALLS += target qmldir pdump