cards/qmlapplicationviewer/qmlapplicationviewer.pri
changeset 3 2e16639599b7
equal deleted inserted replaced
0:061910b224a4 3:2e16639599b7
       
     1 # checksum 0xc123 version 0x10008
       
     2 # This file should not be edited.
       
     3 # Future versions of Qt Creator might offer updated versions of this file.
       
     4 
       
     5 QT += declarative
       
     6 
       
     7 SOURCES += $$PWD/qmlapplicationviewer.cpp
       
     8 HEADERS += $$PWD/qmlapplicationviewer.h
       
     9 INCLUDEPATH += $$PWD
       
    10 
       
    11 contains(DEFINES, QMLOBSERVER) {
       
    12     DEFINES *= QMLJSDEBUGGER
       
    13 }
       
    14 
       
    15 defineTest(minQtVersion) {
       
    16     maj = $$1
       
    17     min = $$2
       
    18     patch = $$3
       
    19     isEqual(QT_MAJOR_VERSION, $$maj) {
       
    20         isEqual(QT_MINOR_VERSION, $$min) {
       
    21             isEqual(QT_PATCH_VERSION, $$patch) {
       
    22                 return(true)
       
    23             }
       
    24             greaterThan(QT_PATCH_VERSION, $$patch) {
       
    25                 return(true)
       
    26             }
       
    27         }
       
    28         greaterThan(QT_MINOR_VERSION, $$min) {
       
    29             return(true)
       
    30         }
       
    31     }
       
    32     return(false)
       
    33 }
       
    34 
       
    35 contains(DEFINES, QMLJSDEBUGGER) {
       
    36     CONFIG(debug, debug|release) {
       
    37         !minQtVersion(4, 7, 1) {
       
    38             warning()
       
    39             warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.")
       
    40             warning("This library requires Qt 4.7.1 or newer.")
       
    41             warning()
       
    42 
       
    43             error("Qt version $$QT_VERSION too old for QmlJS Debugging. Aborting.")
       
    44         }
       
    45         isEmpty(QMLJSDEBUGGER_PATH) {
       
    46             warning()
       
    47             warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.")
       
    48             warning("Please specify its location on the qmake command line, eg")
       
    49             warning("  qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger")
       
    50             warning()
       
    51 
       
    52             error("QMLJSDEBUGGER defined, but no QMLJSDEBUGGER_PATH set on command line. Aborting.")
       
    53             DEFINES -= QMLJSDEBUGGER
       
    54         } else {
       
    55             include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri)
       
    56         }
       
    57     } else {
       
    58         DEFINES -= QMLJSDEBUGGER
       
    59     }
       
    60 }
       
    61 # This file should not be edited.
       
    62 # Future versions of Qt Creator might offer updated versions of this file.
       
    63 
       
    64 defineTest(qtcAddDeployment) {
       
    65 for(deploymentfolder, DEPLOYMENTFOLDERS) {
       
    66     item = item$${deploymentfolder}
       
    67     itemsources = $${item}.sources
       
    68     $$itemsources = $$eval($${deploymentfolder}.source)
       
    69     itempath = $${item}.path
       
    70     $$itempath= $$eval($${deploymentfolder}.target)
       
    71     export($$itemsources)
       
    72     export($$itempath)
       
    73     DEPLOYMENT += $$item
       
    74 }
       
    75 
       
    76 MAINPROFILEPWD = $$PWD
       
    77 
       
    78 symbian {
       
    79     ICON = $${TARGET}.svg
       
    80     TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
       
    81     contains(DEFINES, ORIENTATIONLOCK):LIBS += -lavkon -leikcore -leiksrv -lcone
       
    82     contains(DEFINES, NETWORKACCESS):TARGET.CAPABILITY += NetworkServices
       
    83 } else:win32 {
       
    84     !isEqual(PWD,$$OUT_PWD) {
       
    85         copyCommand = @echo Copying application data...
       
    86         for(deploymentfolder, DEPLOYMENTFOLDERS) {
       
    87             source = $$eval($${deploymentfolder}.source)
       
    88             pathSegments = $$split(source, /)
       
    89             sourceAndTarget = $$MAINPROFILEPWD/$$source $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(pathSegments)
       
    90             copyCommand += && $(COPY_DIR) $$replace(sourceAndTarget, /, \\)
       
    91         }
       
    92         copydeploymentfolders.commands = $$copyCommand
       
    93         first.depends = $(first) copydeploymentfolders
       
    94         export(first.depends)
       
    95         export(copydeploymentfolders.commands)
       
    96         QMAKE_EXTRA_TARGETS += first copydeploymentfolders
       
    97     }
       
    98 } else:unix {
       
    99     maemo5 {
       
   100         installPrefix = /opt/usr
       
   101         desktopfile.path = /usr/share/applications/hildon       
       
   102     } else {
       
   103         installPrefix = /usr/local
       
   104         desktopfile.path = /usr/share/applications
       
   105         !isEqual(PWD,$$OUT_PWD) {
       
   106             copyCommand = @echo Copying application data...
       
   107             for(deploymentfolder, DEPLOYMENTFOLDERS) {
       
   108                 macx {
       
   109                     target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
       
   110                 } else {
       
   111                     target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
       
   112                 }
       
   113                 copyCommand += && $(MKDIR) $$target
       
   114                 copyCommand += && $(COPY_DIR) $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) $$target
       
   115             }
       
   116             copydeploymentfolders.commands = $$copyCommand
       
   117             first.depends = $(first) copydeploymentfolders
       
   118             export(first.depends)
       
   119             export(copydeploymentfolders.commands)
       
   120             QMAKE_EXTRA_TARGETS += first copydeploymentfolders
       
   121         }
       
   122     }
       
   123     for(deploymentfolder, DEPLOYMENTFOLDERS) {
       
   124         item = item$${deploymentfolder}
       
   125         itemfiles = $${item}.files
       
   126         $$itemfiles = $$eval($${deploymentfolder}.source)
       
   127         itempath = $${item}.path
       
   128         $$itempath = $${installPrefix}/share/$${TARGET}/$$eval($${deploymentfolder}.target)
       
   129         export($$itemfiles)
       
   130         export($$itempath)
       
   131         INSTALLS += $$item
       
   132     }
       
   133     icon.files = $${TARGET}.png
       
   134     icon.path = /usr/share/icons/hicolor/64x64/apps
       
   135     desktopfile.files = $${TARGET}.desktop
       
   136     target.path = $${installPrefix}/bin
       
   137     export(icon.files)
       
   138     export(icon.path)
       
   139     export(desktopfile.files)
       
   140     export(desktopfile.path)
       
   141     export(target.path)
       
   142     INSTALLS += desktopfile icon target
       
   143 }
       
   144 
       
   145 export (ICON)
       
   146 export (INSTALLS)
       
   147 export (DEPLOYMENT)
       
   148 export (TARGET.EPOCHEAPSIZE)
       
   149 export (TARGET.CAPABILITY)
       
   150 export (LIBS)
       
   151 export (QMAKE_EXTRA_TARGETS)
       
   152 }