qmlapplicationviewer.pri 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. # checksum 0x3dc8 version 0x2000a
  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. ICON = $${TARGET}.svg
  75. TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
  76. contains(DEFINES, ORIENTATIONLOCK):LIBS += -lavkon -leikcore -lcone
  77. contains(DEFINES, NETWORKACCESS):TARGET.CAPABILITY += NetworkServices
  78. } else:win32 {
  79. !isEqual(PWD,$$OUT_PWD) {
  80. copyCommand = @echo Copying application data...
  81. for(deploymentfolder, DEPLOYMENTFOLDERS) {
  82. source = $$eval($${deploymentfolder}.source)
  83. pathSegments = $$split(source, /)
  84. sourceAndTarget = $$MAINPROFILEPWD/$$source $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(pathSegments)
  85. copyCommand += && $(COPY_DIR) $$replace(sourceAndTarget, /, \\)
  86. }
  87. copydeploymentfolders.commands = $$copyCommand
  88. first.depends = $(first) copydeploymentfolders
  89. export(first.depends)
  90. export(copydeploymentfolders.commands)
  91. QMAKE_EXTRA_TARGETS += first copydeploymentfolders
  92. }
  93. } else:unix {
  94. maemo5 {
  95. installPrefix = /opt/usr
  96. desktopfile.path = /usr/share/applications/hildon
  97. } else {
  98. installPrefix = /usr/local
  99. desktopfile.path = /usr/share/applications
  100. !isEqual(PWD,$$OUT_PWD) {
  101. copyCommand = @echo Copying application data...
  102. for(deploymentfolder, DEPLOYMENTFOLDERS) {
  103. macx {
  104. target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
  105. } else {
  106. target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
  107. }
  108. copyCommand += && $(MKDIR) $$target
  109. copyCommand += && $(COPY_DIR) $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) $$target
  110. }
  111. copydeploymentfolders.commands = $$copyCommand
  112. first.depends = $(first) copydeploymentfolders
  113. export(first.depends)
  114. export(copydeploymentfolders.commands)
  115. QMAKE_EXTRA_TARGETS += first copydeploymentfolders
  116. }
  117. }
  118. for(deploymentfolder, DEPLOYMENTFOLDERS) {
  119. item = item$${deploymentfolder}
  120. itemfiles = $${item}.files
  121. $$itemfiles = $$eval($${deploymentfolder}.source)
  122. itempath = $${item}.path
  123. $$itempath = $${installPrefix}/share/$${TARGET}/$$eval($${deploymentfolder}.target)
  124. export($$itemfiles)
  125. export($$itempath)
  126. INSTALLS += $$item
  127. }
  128. icon.files = $${TARGET}.png
  129. icon.path = /usr/share/icons/hicolor/64x64/apps
  130. desktopfile.files = $${TARGET}.desktop
  131. target.path = $${installPrefix}/bin
  132. export(icon.files)
  133. export(icon.path)
  134. export(desktopfile.files)
  135. export(desktopfile.path)
  136. export(target.path)
  137. INSTALLS += desktopfile icon target
  138. }
  139. export (ICON)
  140. export (INSTALLS)
  141. export (DEPLOYMENT)
  142. export (TARGET.EPOCHEAPSIZE)
  143. export (TARGET.CAPABILITY)
  144. export (LIBS)
  145. export (QMAKE_EXTRA_TARGETS)
  146. }