gfaqt.pro 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. TEMPLATE = lib
  2. VERSION = 1.7
  3. QT += qml quick core
  4. CONFIG -= app_bundle
  5. CONFIG += c++11 shared thread
  6. ####################################################################################
  7. SOURCES += \
  8. src/helpers.cpp \
  9. src/qappctrl.cpp \
  10. src/qappinfo.cpp \
  11. src/qmysqlinfo.cpp \
  12. src/qnetworkinfo.cpp \
  13. src/qwlaninfo.cpp \
  14. src/qsysinfo.cpp \
  15. src/qgfalocale.cpp \
  16. src/qapplaunch.cpp
  17. HEADERS += \
  18. src/helpers.h \
  19. src/qappctrl.h \
  20. src/qgfalocale.h
  21. ####################################################################################
  22. GFA_LIB_PATH = /usr/lib/gfa
  23. GFA_INC_PATH = /usr/include/gfa
  24. QMAKE_RPATHLINKDIR += $$GFA_LIB_PATH
  25. QMAKE_RPATHDIR += $$GFA_LIB_PATH
  26. QMAKE_DEL_DIR = rmdir --ignore-fail-on-non-empty
  27. QMAKE_LN_SHLIB = :
  28. QMAKE_CXXFLAGS += -Wno-deprecated-copy
  29. QMAKE_CFLAGS += -Wno-deprecated-copy
  30. ####################################################################################
  31. CONFIG(debug, debug|release) {
  32. QMAKE_CXXFLAGS -= -Os
  33. QMAKE_CFLAGS -= -Os
  34. QMAKE_CXXFLAGS += -D_DEBUG
  35. QMAKE_CFLAGS += -D_DEBUG
  36. TARGET = $$join(TARGET,,,d)
  37. }
  38. ####################################################################################
  39. target.path = $$GFA_LIB_PATH
  40. INSTALLS += target
  41. ####################################################################################
  42. linux-g++ {
  43. QMAKE_CXXFLAGS += -Wno-deprecated-declarations -Wno-misleading-indentation -Wno-unused-result
  44. QMAKE_CFLAGS += -Wno-deprecated-declarations -Wno-misleading-indentation -Wno-unused-result
  45. includes.path = $$GFA_INC_PATH
  46. includes.extra += -$(INSTALL_FILE) $$PWD/src/qappctrl.h $(INSTALL_ROOT)$$includes.path
  47. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/qgfalocale.h $(INSTALL_ROOT)$$includes.path
  48. includes.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/qappctrl.h
  49. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/qgfalocale.h
  50. INSTALLS += includes
  51. }
  52. ####################################################################################
  53. linux-buildroot-g++ {
  54. exists($$[QT_SYSROOT]) {
  55. library.path = $$[QT_SYSROOT]$$target.path
  56. library.extra += -$(INSTALL_PROGRAM) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET)
  57. library.extra += $$escape_expand(\\n\\t)-$(SYMLINK) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET0)
  58. library.extra += $$escape_expand(\\n\\t)-$(SYMLINK) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET1)
  59. library.extra += $$escape_expand(\\n\\t)-$(SYMLINK) $(TARGET) $(INSTALL_ROOT)$$library.path/$(TARGET2)
  60. library.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET)
  61. library.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET0)
  62. library.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET1)
  63. library.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$library.path/$(TARGET2)
  64. INSTALLS += library
  65. includes.path = $$[QT_SYSROOT]$$GFA_INC_PATH
  66. includes.extra += -$(INSTALL_FILE) $$PWD/src/qappctrl.h $(INSTALL_ROOT)$$includes.path
  67. includes.extra += $$escape_expand(\\n\\t)-$(INSTALL_FILE) $$PWD/src/qgfalocale.h $(INSTALL_ROOT)$$includes.path
  68. includes.uninstall += -$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/qappctrl.h
  69. includes.uninstall += $$escape_expand(\\n\\t)-$(DEL_FILE) $(INSTALL_ROOT)$$includes.path/qgfalocale.h
  70. INSTALLS += includes
  71. itoolchain.target = install_toolchain
  72. itoolchain.depends = install_library install_includes
  73. QMAKE_EXTRA_TARGETS += itoolchain
  74. utoolchain.target = uninstall_toolchain
  75. utoolchain.depends = uninstall_library uninstall_includes
  76. QMAKE_EXTRA_TARGETS += utoolchain
  77. }
  78. QMAKE_CXXFLAGS += -D_TARGET_BUILD
  79. QMAKE_CFLAGS += -D_TARGET_BUILD
  80. }
  81. ####################################################################################
  82. deploylib.target = deploylib
  83. deploylib.commands = @echo BASENAME="$(QMAKE_TARGET)" > deploytargets
  84. deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET="$(TARGET)" >> deploytargets
  85. deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET0="$(TARGET0)" >> deploytargets
  86. deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET1="$(TARGET1)" >> deploytargets
  87. deploylib.commands += $$escape_expand(\\n\\t)@echo TARGET2="$(TARGET2)" >> deploytargets
  88. deploylib.commands += $$escape_expand(\\n\\t)@echo HEADERS="\\\"qappctrl.h qgfalocale.h\\\"" >> deploytargets
  89. PRE_TARGETDEPS += deploylib
  90. QMAKE_EXTRA_TARGETS += deploylib