libnetinterfaces.pro 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. TEMPLATE = lib
  2. TARGET = netinterfaces
  3. QT += qml
  4. CONFIG += qt plugin c++11
  5. PDUMP="/home/wrk/Qt5.7.0/5.7/gcc_64/bin/qmlplugindump"
  6. VERSION=1.0
  7. PDUMPFILE=net.qmltypes
  8. IMPORTPATH="/home/wrk/Qt5.7.0/5.7/gcc_64/qml"
  9. URI = gfa.plugins.qml.net
  10. QMAKE_LIBDIR += $$[QT_SYSROOT]/usr/lib/gfa
  11. QMAKE_RPATHLINKDIR += $$[QT_SYSROOT]/usr/lib/gfa
  12. QMAKE_RPATHDIR += /usr/lib/gfa
  13. QMAKE_DEL_DIR = rmdir --ignore-fail-on-non-empty
  14. CONFIG(debug, debug|release) {
  15. QMAKE_CXXFLAGS -= -Os
  16. QMAKE_CFLAGS -= -Os
  17. QMAKE_CXXFLAGS += -D_DEBUG
  18. QMAKE_CFLAGS += -D_DEBUG
  19. QMAKE_LIBS += -lgfanetd -lgfaipc
  20. }
  21. CONFIG(release, debug|release) {
  22. QMAKE_LIBS += -lgfanet -lgfaipc
  23. }
  24. SOURCES += \
  25. netinterfaces.cpp \
  26. netinterfaces_plugin.cpp
  27. HEADERS += \
  28. netinterfaces.h \
  29. netinterfaces_plugin.h
  30. copy_qmldir.target = $$OUT_PWD/qmldir
  31. copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir
  32. copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\"
  33. QMAKE_EXTRA_TARGETS += copy_qmldir
  34. PRE_TARGETDEPS += $$copy_qmldir.target
  35. installPath = $$[QT_INSTALL_QML]/$$replace(URI, \\., /)
  36. USER_GROUP = $$system(stat -c "%U:%G" $$[QT_INSTALL_QML])
  37. qmldir.path = $$installPath
  38. qmldir.extra += -$(INSTALL_FILE) qmldir $$installPath
  39. qmldir.uninstall += -$(DEL_FILE) $$installPath/qmldir
  40. pdump.path = $$installPath
  41. linux-g++ {
  42. pdump.extra += "$$PDUMP" -v "$$URI" "$$VERSION" "$$IMPORTPATH" > "$$installPath/$$PDUMPFILE"
  43. }
  44. pdump.extra += $$escape_expand(\\n\\t)chown -R $$USER_GROUP $$installPath
  45. linux-g++ {
  46. pdump.uninstall += -$(DEL_FILE) $$installPath/$$PDUMPFILE
  47. }
  48. target.path = $$installPath
  49. INSTALLS += target qmldir pdump