qmlapplicationviewer.pri 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. # checksum 0x8396 version 0x3000a
  2. # This file was generated by the Qt Quick Application wizard of Qt Creator.
  3. # The code below adds the QmlApplicationViewer to the project and handles the
  4. # activation of QML debugging.
  5. # It is recommended not to modify this file, since newer versions of Qt Creator
  6. # may offer an updated version of it.
  7. QT += declarative
  8. SOURCES += $$PWD/qmlapplicationviewer.cpp
  9. HEADERS += $$PWD/qmlapplicationviewer.h
  10. INCLUDEPATH += $$PWD
  11. defineTest(minQtVersion) {
  12. maj = $$1
  13. min = $$2
  14. patch = $$3
  15. isEqual(QT_MAJOR_VERSION, $$maj) {
  16. isEqual(QT_MINOR_VERSION, $$min) {
  17. isEqual(QT_PATCH_VERSION, $$patch) {
  18. return(true)
  19. }
  20. greaterThan(QT_PATCH_VERSION, $$patch) {
  21. return(true)
  22. }
  23. }
  24. greaterThan(QT_MINOR_VERSION, $$min) {
  25. return(true)
  26. }
  27. }
  28. return(false)
  29. }
  30. contains(DEFINES, QMLJSDEBUGGER) {
  31. CONFIG(debug, debug|release) {
  32. !minQtVersion(4, 7, 1) {
  33. warning()
  34. warning("Disabling QML debugging:")
  35. warning()
  36. warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.")
  37. warning("This library requires Qt 4.7.1 or newer.")
  38. warning()
  39. DEFINES -= QMLJSDEBUGGER
  40. } else:isEmpty(QMLJSDEBUGGER_PATH) {
  41. warning()
  42. warning("Disabling QML debugging:")
  43. warning()
  44. warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.")
  45. warning("Please specify its location on the qmake command line, eg")
  46. warning(" qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger")
  47. warning()
  48. DEFINES -= QMLJSDEBUGGER
  49. } else {
  50. include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri)
  51. }
  52. } else {
  53. DEFINES -= QMLJSDEBUGGER
  54. }
  55. }
  56. # This file was generated by an application wizard of Qt Creator.
  57. # The code below handles deployment to Symbian and Maemo, aswell as copying
  58. # of the application data to shadow build directories on desktop.
  59. # It is recommended not to modify this file, since newer versions of Qt Creator
  60. # may offer an updated version of it.
  61. defineTest(qtcAddDeployment) {
  62. for(deploymentfolder, DEPLOYMENTFOLDERS) {
  63. item = item$${deploymentfolder}
  64. itemsources = $${item}.sources
  65. $$itemsources = $$eval($${deploymentfolder}.source)
  66. itempath = $${item}.path
  67. $$itempath= $$eval($${deploymentfolder}.target)
  68. export($$itemsources)
  69. export($$itempath)
  70. DEPLOYMENT += $$item
  71. }
  72. MAINPROFILEPWD = $$PWD
  73. symbian {
  74. isEmpty(ICON):exists($${TARGET}.svg):ICON = $${TARGET}.svg
  75. isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
  76. } else:win32 {
  77. copyCommand =
  78. for(deploymentfolder, DEPLOYMENTFOLDERS) {
  79. source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
  80. source = $$replace(source, /, \\)
  81. sourcePathSegments = $$split(source, \\)
  82. target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments)
  83. target = $$replace(target, /, \\)
  84. !isEqual(source,$$target) {
  85. !isEmpty(copyCommand):copyCommand += &&
  86. copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
  87. }
  88. }
  89. !isEmpty(copyCommand) {
  90. copyCommand = @echo Copying application data... && $$copyCommand
  91. copydeploymentfolders.commands = $$copyCommand
  92. first.depends = $(first) copydeploymentfolders
  93. export(first.depends)
  94. export(copydeploymentfolders.commands)
  95. QMAKE_EXTRA_TARGETS += first copydeploymentfolders
  96. }
  97. } else:unix {
  98. maemo5 {
  99. installPrefix = /opt/usr
  100. desktopfile.path = /usr/share/applications/hildon
  101. } else {
  102. installPrefix = /usr/local
  103. desktopfile.path = /usr/share/applications
  104. copyCommand =
  105. for(deploymentfolder, DEPLOYMENTFOLDERS) {
  106. source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
  107. source = $$replace(source, \\, /)
  108. macx {
  109. target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
  110. } else {
  111. target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
  112. }
  113. target = $$replace(target, \\, /)
  114. sourcePathSegments = $$split(source, /)
  115. targetFullPath = $$target/$$last(sourcePathSegments)
  116. !isEqual(source,$$targetFullPath) {
  117. !isEmpty(copyCommand):copyCommand += &&
  118. copyCommand += $(MKDIR) \"$$target\"
  119. copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\"
  120. }
  121. }
  122. !isEmpty(copyCommand) {
  123. copyCommand = @echo Copying application data... && $$copyCommand
  124. copydeploymentfolders.commands = $$copyCommand
  125. first.depends = $(first) copydeploymentfolders
  126. export(first.depends)
  127. export(copydeploymentfolders.commands)
  128. QMAKE_EXTRA_TARGETS += first copydeploymentfolders
  129. }
  130. }
  131. for(deploymentfolder, DEPLOYMENTFOLDERS) {
  132. item = item$${deploymentfolder}
  133. itemfiles = $${item}.files
  134. $$itemfiles = $$eval($${deploymentfolder}.source)
  135. itempath = $${item}.path
  136. $$itempath = $${installPrefix}/share/$${TARGET}/$$eval($${deploymentfolder}.target)
  137. export($$itemfiles)
  138. export($$itempath)
  139. INSTALLS += $$item
  140. }
  141. icon.files = $${TARGET}.png
  142. icon.path = /usr/share/icons/hicolor/64x64/apps
  143. desktopfile.files = $${TARGET}.desktop
  144. target.path = $${installPrefix}/bin
  145. export(icon.files)
  146. export(icon.path)
  147. export(desktopfile.files)
  148. export(desktopfile.path)
  149. export(target.path)
  150. INSTALLS += desktopfile icon target
  151. }
  152. export (ICON)
  153. export (INSTALLS)
  154. export (DEPLOYMENT)
  155. export (TARGET.EPOCHEAPSIZE)
  156. export (TARGET.CAPABILITY)
  157. export (LIBS)
  158. export (QMAKE_EXTRA_TARGETS)
  159. }