libandroidplugin added
[mardrone] / mardrone / deploy.pri
1 # This file was generated by an application wizard of Qt Creator.
2 # The code below handles deployment to Symbian and Maemo, aswell as copying
3 # of the application data to shadow build directories on desktop.
4 # It is recommended not to modify this file, since newer versions of Qt Creator
5 # may offer an updated version of it.
6
7 defineTest(qtcAddDeployment) {
8 message("qtcAddDeployment()")
9 message($$DEPLOYMENTFOLDERS)
10 for(deploymentfolder, DEPLOYMENTFOLDERS) {
11     item = item$${deploymentfolder}
12     itemsources = $${item}.sources
13     $$itemsources = $$eval($${deploymentfolder}.source)
14     itempath = $${item}.path
15     $$itempath= $$eval($${deploymentfolder}.target)
16     export($$itemsources)
17     export($$itempath)
18     DEPLOYMENT += $$item
19 }
20
21 MAINPROFILEPWD = $$PWD
22
23 symbian {
24     isEmpty(ICON):exists($${TARGET}.svg):ICON = $${TARGET}.svg
25     isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
26 } else:win32 {
27     copyCommand =
28     for(deploymentfolder, DEPLOYMENTFOLDERS) {
29         source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
30         source = $$replace(source, /, \\)
31         sourcePathSegments = $$split(source, \\)
32         target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments)
33         target = $$replace(target, /, \\)
34         !isEqual(source,$$target) {
35             !isEmpty(copyCommand):copyCommand += &&
36             isEqual(QMAKE_DIR_SEP, \\) {
37                 copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
38             } else {
39                 source = $$replace(source, \\\\, /)
40                 target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
41                 target = $$replace(target, \\\\, /)
42                 copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\"
43             }
44         }
45     }
46     !isEmpty(copyCommand) {
47         copyCommand = @echo Copying application data... && $$copyCommand
48         copydeploymentfolders.commands = $$copyCommand
49         first.depends = $(first) copydeploymentfolders
50         export(first.depends)
51         export(copydeploymentfolders.commands)
52         QMAKE_EXTRA_TARGETS += first copydeploymentfolders
53     }
54 } else:unix {
55     maemo5 {
56         desktopfile.files = $${TARGET}.desktop
57         desktopfile.path = /usr/share/applications/hildon
58         icon.files = $${TARGET}64.png
59         icon.path = /usr/share/icons/hicolor/64x64/apps
60     } else:!isEmpty(MEEGO_VERSION_MAJOR) {
61         desktopfile.files = $${TARGET}_harmattan.desktop
62         desktopfile.path = /usr/share/applications
63         icon.files = $${TARGET}80.png
64         icon.path = /usr/share/icons/hicolor/80x80/apps
65     } else { # Assumed to be a Desktop Unix
66         copyCommand =
67         for(deploymentfolder, DEPLOYMENTFOLDERS) {
68             source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
69             source = $$replace(source, \\\\, /)
70             macx {
71                 target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
72             } else {
73                 target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
74             }
75             target = $$replace(target, \\\\, /)
76             sourcePathSegments = $$split(source, /)
77             targetFullPath = $$target/$$last(sourcePathSegments)
78             !isEqual(source,$$targetFullPath) {
79                 !isEmpty(copyCommand):copyCommand += &&
80                 copyCommand += $(MKDIR) \"$$target\"
81                 copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\"
82             }
83         }
84         !isEmpty(copyCommand) {
85             copyCommand = @echo Copying application data... && $$copyCommand
86             copydeploymentfolders.commands = $$copyCommand
87             first.depends = $(first) copydeploymentfolders
88             export(first.depends)
89             export(copydeploymentfolders.commands)
90             QMAKE_EXTRA_TARGETS += first copydeploymentfolders
91         }
92     }
93     android {
94         installPrefix = /assets
95     } else {
96         installPrefix = /opt/$${TARGET}
97     }
98     for(deploymentfolder, DEPLOYMENTFOLDERS) {
99         item = item$${deploymentfolder}
100         itemfiles = $${item}.files
101         $$itemfiles = $$eval($${deploymentfolder}.source)
102         itempath = $${item}.path
103         $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target)
104         export($$itemfiles)
105         export($$itempath)
106         INSTALLS += $$item
107     }
108
109     !android: !isEmpty(desktopfile.path) {
110         export(icon.files)
111         export(icon.path)
112         export(desktopfile.files)
113         export(desktopfile.path)
114         INSTALLS += icon desktopfile
115     }
116
117     !android {
118         target.path = $${installPrefix}/bin
119     } else {
120         x86 {
121             target.path = /libs/x86
122         } else: armeabi-v7a {
123             target.path = /libs/armeabi-v7a
124         } else {
125             target.path = /libs/armeabi
126         }
127     }
128     export(target.path)
129     INSTALLS += target
130 }
131
132 export (ICON)
133 export (INSTALLS)
134 export (DEPLOYMENT)
135 export (TARGET.EPOCHEAPSIZE)
136 export (TARGET.CAPABILITY)
137 export (LIBS)
138 export (QMAKE_EXTRA_TARGETS)
139 }