components for android 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 for(deploymentfolder, DEPLOYMENTFOLDERS) {
9     item = item$${deploymentfolder}
10     itemsources = $${item}.sources
11     $$itemsources = $$eval($${deploymentfolder}.source)
12     itempath = $${item}.path
13     $$itempath= $$eval($${deploymentfolder}.target)
14     export($$itemsources)
15     export($$itempath)
16     DEPLOYMENT += $$item
17 }
18
19 MAINPROFILEPWD = $$PWD
20
21 symbian {
22     isEmpty(ICON):exists($${TARGET}.svg):ICON = $${TARGET}.svg
23     isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
24 } else:win32 {
25     copyCommand =
26     for(deploymentfolder, DEPLOYMENTFOLDERS) {
27         source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
28         source = $$replace(source, /, \\)
29         sourcePathSegments = $$split(source, \\)
30         target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments)
31         target = $$replace(target, /, \\)
32         !isEqual(source,$$target) {
33             !isEmpty(copyCommand):copyCommand += &&
34             isEqual(QMAKE_DIR_SEP, \\) {
35                 copyCommand += $(COPY_DIR) \"$$source\" \"$$target\"
36             } else {
37                 source = $$replace(source, \\\\, /)
38                 target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
39                 target = $$replace(target, \\\\, /)
40                 copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\"
41             }
42         }
43     }
44     !isEmpty(copyCommand) {
45         copyCommand = @echo Copying application data... && $$copyCommand
46         copydeploymentfolders.commands = $$copyCommand
47         first.depends = $(first) copydeploymentfolders
48         export(first.depends)
49         export(copydeploymentfolders.commands)
50         QMAKE_EXTRA_TARGETS += first copydeploymentfolders
51     }
52 } else:unix {
53     maemo5 {
54         desktopfile.files = $${TARGET}.desktop
55         desktopfile.path = /usr/share/applications/hildon
56         icon.files = $${TARGET}64.png
57         icon.path = /usr/share/icons/hicolor/64x64/apps
58     } else:!isEmpty(MEEGO_VERSION_MAJOR) {
59         desktopfile.files = $${TARGET}_harmattan.desktop
60         desktopfile.path = /usr/share/applications
61         icon.files = $${TARGET}80.png
62         icon.path = /usr/share/icons/hicolor/80x80/apps
63     } else { # Assumed to be a Desktop Unix
64         copyCommand =
65         for(deploymentfolder, DEPLOYMENTFOLDERS) {
66             source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source)
67             source = $$replace(source, \\\\, /)
68             macx {
69                 target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target)
70             } else {
71                 target = $$OUT_PWD/$$eval($${deploymentfolder}.target)
72             }
73             target = $$replace(target, \\\\, /)
74             sourcePathSegments = $$split(source, /)
75             targetFullPath = $$target/$$last(sourcePathSegments)
76             !isEqual(source,$$targetFullPath) {
77                 !isEmpty(copyCommand):copyCommand += &&
78                 copyCommand += $(MKDIR) \"$$target\"
79                 copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\"
80             }
81         }
82         !isEmpty(copyCommand) {
83             copyCommand = @echo Copying application data... && $$copyCommand
84             copydeploymentfolders.commands = $$copyCommand
85             first.depends = $(first) copydeploymentfolders
86             export(first.depends)
87             export(copydeploymentfolders.commands)
88             QMAKE_EXTRA_TARGETS += first copydeploymentfolders
89         }
90     }
91     android {
92         installPrefix = /assets
93     } else {
94         installPrefix = /opt/$${TARGET}
95     }
96     for(deploymentfolder, DEPLOYMENTFOLDERS) {
97         item = item$${deploymentfolder}
98         itemfiles = $${item}.files
99         $$itemfiles = $$eval($${deploymentfolder}.source)
100         itempath = $${item}.path
101         $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target)
102         export($$itemfiles)
103         export($$itempath)
104         INSTALLS += $$item
105     }
106
107     !android: !isEmpty(desktopfile.path) {
108         export(icon.files)
109         export(icon.path)
110         export(desktopfile.files)
111         export(desktopfile.path)
112         INSTALLS += icon desktopfile
113     }
114
115     !android {
116         target.path = $${installPrefix}/bin
117     } else {
118         x86 {
119             target.path = /libs/x86
120         } else: armeabi-v7a {
121             target.path = /libs/armeabi-v7a
122         } else {
123             target.path = /libs/armeabi
124         }
125     }
126     export(target.path)
127     INSTALLS += target
128 }
129
130 export (ICON)
131 export (INSTALLS)
132 export (DEPLOYMENT)
133 export (TARGET.EPOCHEAPSIZE)
134 export (TARGET.CAPABILITY)
135 export (LIBS)
136 export (QMAKE_EXTRA_TARGETS)
137 }