Fix missing desktop file during installation
[quandoparte] / application / application.pro
1 #-------------------------------------------------
2 #
3 # Project created by QtCreator 2010-11-13T19:51:39
4 #
5 #-------------------------------------------------
6
7 VERSION = 0.4.80
8
9 QT += webkit network
10 CONFIG += qt webkit mobility
11 MOBILITY = location
12
13 contains(MEEGO_EDITION,harmattan) {
14     CONFIG += harmattan
15 }
16
17 harmattan {
18     QT += declarative
19     PLATFORM = harmattan
20     DEFINES += TARGET_PLATFORM_HARMATTAN
21     # enable booster
22     CONFIG += qdeclarative-boostable
23     QMAKE_CXXFLAGS += -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wno-psabi
24     QMAKE_LFLAGS += -pie -rdynamic
25     PLATFORM_SOURCES = view.cpp
26     PLATFORM_HEADERS = view.h
27 }
28 maemo5 {
29     QT += maemo5
30     PLATFORM = fremantle
31     DEFINES += TARGET_PLATFORM_FREMANTLE
32     PLATFORM_SOURCES = \
33         app.cpp \
34         stationlistview.cpp \
35         stationview.cpp \
36         settingsdialog.cpp \
37         keypressforwarder.cpp
38     PLATFORM_HEADERS= \
39         app.h \
40         stationlistview.h \
41         keypressforwarder.h \
42         settingsdialog.h \
43         stationview.h
44 }
45 symbian {
46     QT += declarative
47     DEFINES += TARGET_PLATFORM_SYMBIAN
48     PLATFORM = symbian
49     PLATFORM_SOURCES = view.cpp
50     PLATFORM_HEADERS = view.h
51 }
52 !harmattan:!maemo5:!symbian {
53     PLATFORM = desktop
54     DEFINES += TARGET_PLATFORM_DESKTOP
55     PLATFORM_SOURCES = view.cpp
56 }
57
58 message(Compiling For:    $$PLATFORM)
59 message(Platform Sources: $$PLATFORM_SOURCES)
60 message(Qt Modules Used:  $$QT)
61 message(Building version: $$VERSION)
62
63 TARGET = quandoparte
64 TEMPLATE = app
65 VERSION_STRING = '\\"$${VERSION}\\"'
66 DEFINES += QP_VERSION=\"$${VERSION_STRING}\"
67
68 !debug {
69 #    DEFINES += QT_NO_DEBUG_OUTPUT
70 }
71
72 TRANSLATIONS = resources/i18n/quandoparte_it.ts
73
74 SOURCES += \
75     $$PLATFORM_SOURCES \
76     main.cpp \
77     stationlistmodel.cpp \
78     stationlistproxymodel.cpp \
79     settings.cpp \
80     dataprovider.cpp \
81     stationschedulemodel.cpp \
82     stationscheduleitem.cpp
83
84 HEADERS += \
85     $$PLATFORM_HEADERS \
86     stationlistmodel.h \
87     stationlistproxymodel.h \
88     settings.h \
89     dataprovider.h \
90     stationschedulemodel.h \
91     stationscheduleitem.h
92
93 FORMS += \
94     settingsdialog.ui \
95     stationlistview.ui
96
97 symbian {
98     TARGET.UID3 = 0xe30fb688
99     # TARGET.CAPABILITY += 
100     TARGET.EPOCSTACKSIZE = 0x14000
101     TARGET.EPOCHEAPSIZE = 0x020000 0x800000
102 }
103
104 OTHER_FILES += \
105     resources/harmattan/applications/quandoparte.desktop \
106     resources/fremantle/applications/quandoparte.desktop \
107     icons/48x48/quandoparte.png \
108     icons/64x64/quandoparte.png \
109     icons/scalable/quandoparte.svg \
110     icons/quandoparte.png \
111     resources/quandoparte.css \
112     resources/arrivals.css \
113     resources/departures.css \
114     $$replace(TRANSLATIONS, .ts, .qm) \
115     resources/stations/stations.qpl \
116     resources/stations/generatelist.xq \
117     resources/stations/generateunclassifiedlist.xq \
118     resources/harmattan/qml/main.qml \
119     resources/harmattan/qml/StationListPage.qml \
120     resources/harmattan/qml/StationPage.qml \
121     resources/harmattan/qml/SearchBar.qml \
122     resources/harmattan/qml/PageHeader.qml \
123     resources/harmattan/qml/uiconstants.js \
124     resources/harmattan/qml/StationListPage.js \
125     resources/harmattan/qml/AboutPage.qml \
126     resources/harmattan/qml/InfoBar.qml
127
128 unix {
129     isEmpty(PREFIX) {
130         maemo5 {
131             PREFIX=/opt/usr
132         }
133         harmattan {
134             PREFIX=/opt/$${TARGET}
135         }
136         desktop {
137             PREFIX=/usr/local
138         }
139     }
140     maemo5 {
141         DESKTOPDIR=/usr/share/applications/hildon
142     }
143     harmattan {
144         DESKTOPDIR=/usr/share/applications
145     }
146     desktop {
147         DESKTOPDIR=$$PREFIX/share/applications
148     }
149
150     BINDIR=$$PREFIX/bin
151     DATADIR=$$PREFIX/share/apps/$${TARGET}
152     DEFINES += DATADIR=\\\"$${DATADIR}\\\" PKGDATADIR=\\\"$${PKGDATADIR}\\\"
153 }
154
155 message(Installing to prefix $$PREFIX)
156
157 unix:!symbian {
158     target.path = $$BINDIR
159     INSTALLS += target
160 }
161
162 unix:!symbian {
163     desktopfile.files = resources/$$PLATFORM/applications/$${TARGET}.desktop
164     desktopfile.path = $$DESKTOPDIR
165     INSTALLS += desktopfile
166 }
167
168 unix:!symbian {
169     css.files = resources/$${TARGET}.css resources/arrivals.css resources/departures.css
170     i18n.files = $$replace(TRANSLATIONS, .ts, .qm)
171     stations.files = resources/stations/stations.qpl
172
173     i18n.path = $$DATADIR/i18n
174     css.path = $$DATADIR/css
175     stations.path = $$DATADIR/stations
176
177     icon48.files = icons/48x48/$${TARGET}.png
178     icon64.files = icons/64x64/$${TARGET}.png
179     iconscalable.files = icons/scalable/$${TARGET}.svg
180
181     icon48.path = /usr/share/icons/hicolor/48x48/apps
182     icon64.path = /usr/share/icons/hicolor/64x64/apps
183     iconscalable.path = /usr/share/icons/hicolor/scalable/apps
184
185     INSTALLS += icon48
186     INSTALLS += icon64
187     INSTALLS += iconscalable
188     INSTALLS += css
189     INSTALLS += i18n
190     INSTALLS += stations
191 }
192
193 harmattan {
194     qml.files = resources/harmattan/qml/*.qml resources/harmattan/qml/*.js
195     qml.path = $$DATADIR/qml
196     INSTALLS += qml
197 }