Bump version to 0.9.0
[quandoparte] / application / application.pro
1 #-------------------------------------------------
2 #
3 # Project created by QtCreator 2010-11-13T19:51:39
4 #
5 #-------------------------------------------------
6
7 isEmpty(VERSION) {
8     VERSION = 0.7.0rc
9 }
10 USE_RESOURCES = 0
11
12 QT += network
13 CONFIG += qt
14 CONFIG += link_pkgconfig
15
16 lessThan(QT_MAJOR_VERSION, 5) {
17     QT += webkit
18     CONFIG += webkit mobility
19     MOBILITY = location
20 } else {
21     QT += qml quick concurrent location webkitwidgets webkit
22 }
23
24 contains(MEEGO_EDITION, harmattan) {
25    CONFIG += harmattan
26 }
27
28 sailfish {
29     PLATFORM = sailfish
30     DEFINES += TARGET_PLATFORM_SAILFISH
31     # enable booster
32 packagesExist(qdeclarative-boostable) {
33     message("Building with qdeclarative-boostable support")
34     DEFINES += HAS_BOOSTER
35     PKGCONFIG += qdeclarative-boostable
36 } else {
37     warning("qdeclarative-boostable not available; startup times will be slower")
38 }
39     QMAKE_LFLAGS += -pie -rdynamic
40     PLATFORM_SOURCES = view.cpp
41     PLATFORM_HEADERS = view.h view_qt5.h
42 }
43 harmattan {
44     QT += declarative
45     PLATFORM = harmattan
46     DEFINES += TARGET_PLATFORM_HARMATTAN
47     # enable booster
48     CONFIG += qdeclarative-boostable
49     QMAKE_CXXFLAGS += -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wno-psabi
50     QMAKE_LFLAGS += -pie -rdynamic
51     PLATFORM_SOURCES = view.cpp
52     PLATFORM_HEADERS = view.h view_qt4.h
53 }
54 maemo5 {
55     QT += maemo5
56     PLATFORM = fremantle
57     DEFINES += TARGET_PLATFORM_FREMANTLE
58     PLATFORM_SOURCES = \
59         app.cpp \
60         stationlistview.cpp \
61         stationview.cpp \
62         settingsdialog.cpp \
63         keypressforwarder.cpp
64     PLATFORM_HEADERS= \
65         app.h \
66         stationlistview.h \
67         keypressforwarder.h \
68         settingsdialog.h \
69         stationview.h
70     FORMS += \
71         settingsdialog.ui \
72         stationlistview.ui
73 }
74 !sailfish:!harmattan:!maemo5 {
75     PLATFORM = desktop
76     DEFINES += TARGET_PLATFORM_DESKTOP
77     PLATFORM_SOURCES = view.cpp
78 }
79
80 message(Compiling For:    $$PLATFORM)
81 message(Platform Sources: $$PLATFORM_SOURCES)
82 message(Qt Version:       $$QT_MAJOR_VERSION"."$$QT_MINOR_VERSION)
83 message(Qt Modules Used:  $$QT)
84 message(Building version: $$VERSION)
85
86 TARGET = quandoparte
87 TEMPLATE = app
88 VERSION_STRING = '\\"$${VERSION}\\"'
89 DEFINES += QP_VERSION=\"$${VERSION_STRING}\"
90
91 contains(USE_RESOURCES, 1) {
92     DEFINES += USE_RESOURCES=1
93     CONFIG += resources
94 }
95
96 !debug {
97     DEFINES += QT_NO_DEBUG_OUTPUT
98 }
99
100 TRANSLATIONS = resources/i18n/quandoparte_it.ts
101
102 SOURCES += \
103     $$PLATFORM_SOURCES \
104     main.cpp \
105     stationitem.cpp \
106     stationlistmodel.cpp \
107     stationlistproxymodel.cpp \
108     settings.cpp \
109     dataprovider.cpp \
110     stationschedulemodel.cpp \
111     stationscheduleitem.cpp
112
113 HEADERS += \
114     $$PLATFORM_HEADERS \
115     stationitem.h \
116     stationlistmodel.h \
117     stationlistproxymodel.h \
118     settings.h \
119     dataprovider.h \
120     stationschedulemodel.h \
121     stationscheduleitem.h
122
123 QMLSOURCES = \
124     resources/harmattan/qml/main.qml \
125     resources/harmattan/qml/StationListPage.qml \
126     resources/harmattan/qml/StationPage.qml \
127     resources/harmattan/qml/SearchBar.qml \
128     resources/harmattan/qml/PageHeader.qml \
129     resources/harmattan/qml/PageHeader.js \
130     resources/harmattan/qml/uiconstants.js \
131     resources/harmattan/qml/StationListPage.js \
132     resources/harmattan/qml/AboutPage.qml \
133     resources/harmattan/qml/InfoBar.qml \
134     resources/harmattan/qml/DroppedShadow.qml \
135     resources/harmattan/qml/DelayIndicator.qml \
136     resources/harmattan/qml/StationScheduleDelegate.qml \
137     resources/sailfish/qml/main.qml \
138     resources/sailfish/qml/cover/CoverPage.qml \
139     resources/sailfish/qml/pages/AboutPage.qml \
140     resources/sailfish/qml/pages/StationListPage.qml \
141     resources/sailfish/qml/pages/StationPage.qml \
142     resources/sailfish/qml/pages/components/DelayIndicator.qml \
143     resources/sailfish/qml/pages/components/StationScheduleDelegate.qml
144
145 OTHER_FILES += \
146     resources/sailfish/applications/quandoparte.desktop \
147     resources/harmattan/applications/quandoparte.desktop \
148     resources/fremantle/applications/quandoparte.desktop \
149     icons/48x48/quandoparte.png \
150     icons/64x64/quandoparte.png \
151     icons/80x80/quandoparte.png \
152     icons/scalable/quandoparte.svg \
153     icons/sailfish/86x86/quandoparte.png \
154     icons/sailfish/scalable/quandoparte.svg \
155     icons/quandoparte.png \
156     resources/quandoparte.css \
157     resources/arrivals.css \
158     resources/departures.css \
159     $$replace(TRANSLATIONS, .ts, .qm) \
160     resources/stations/stations.qpl \
161     resources/stations/generatelist.xq \
162     resources/stations/generateunclassifiedlist.xq \
163     $$QMLSOURCES \
164     resources/sailfish/qml/StationListPage.qml
165
166 isEmpty(PREFIX) {
167     maemo5 {
168         PREFIX=/opt/usr
169     }
170     harmattan {
171         PREFIX=/opt/$${TARGET}
172     }
173     sailfish {
174         PREFIX=/usr
175     }
176     !maemo5:!harmattan:!sailfish {
177         PREFIX=/usr/local
178     }
179 }
180 maemo5 {
181     DESKTOPDIR=/usr/share/applications/hildon
182 }
183 harmattan {
184     DESKTOPDIR=/usr/share/applications
185 }
186 sailfish {
187     DESKTOPDIR=$$PREFIX/share/applications
188 }
189 desktop {
190     DESKTOPDIR=$$PREFIX/share/applications
191 }
192 BINDIR=$$PREFIX/bin
193 contains(USE_RESOURCES, 1) {
194     DATADIR=":"
195 } else {
196     DATADIR=$$PREFIX/share/apps/$${TARGET}
197 }
198 DEFINES += DATADIR=\\\"$${DATADIR}\\\" PKGDATADIR=\\\"$${PKGDATADIR}\\\"
199
200 message(Installing to prefix $$PREFIX)
201 message(Executable to $$BINDIR)
202 message(Desktop file to $$DESKTOPDIR)
203 message(Data to $$DATADIR)
204 message(Extra defines $$DEFINES)
205
206 target.path = $$BINDIR
207 INSTALLS += target
208
209 unix {
210     desktopfile.files = resources/$$PLATFORM/applications/$${TARGET}.desktop
211     desktopfile.path = $$DESKTOPDIR
212     INSTALLS += desktopfile
213
214     i18n.files = $$replace(TRANSLATIONS, .ts, .qm)
215     stations.files = resources/stations/stations.qpl
216
217     i18n.path = $$DATADIR/i18n
218     stations.path = $$DATADIR/stations
219
220     INSTALLS += i18n
221     INSTALLS += stations
222 }
223
224 sailfish {
225     desktopfile.files = resources/$$PLATFORM/applications/$${TARGET}.desktop
226     desktopfile.path = $$DESKTOPDIR
227     INSTALLS += desktopfile
228
229     i18n.files = $$replace(TRANSLATIONS, .ts, .qm)
230     stations.files = resources/stations/stations.qpl
231
232     i18n.path = $$DATADIR/i18n
233     stations.path = $$DATADIR/stations
234
235     INSTALLS += i18n
236     INSTALLS += stations
237 }
238
239 desktop {
240     icon48.files = icons/48x48/$${TARGET}.png
241     icon64.files = icons/64x64/$${TARGET}.png
242     iconscalable.files = icons/scalable/$${TARGET}.svg
243
244     icon48.path = /usr/share/icons/hicolor/48x48/apps
245     icon64.path = /usr/share/icons/hicolor/64x64/apps
246     iconscalable.path = /usr/share/icons/hicolor/scalable/apps
247
248     INSTALLS += icon48
249     INSTALLS += iconscalable
250 }
251
252 maemo5 {
253     css.files = resources/$${TARGET}.css resources/arrivals.css resources/departures.css
254     css.path = $$DATADIR/css
255     !contains(USE_RESOURCES, 1) {
256         INSTALLS += css
257     }
258 }
259
260 sailfish {
261     QML_IMPORT_PATH = resources/sailfish/qml/
262     icon86.files = icons/sailfish/86x86/$${TARGET}.png
263     icon86.path = /usr/share/icons/hicolor/86x86/apps
264     INSTALLS += icon86
265 }
266
267 harmattan {
268     desktopfile.files = resources/$$PLATFORM/applications/$${TARGET}.desktop
269     desktopfile.path = $$DESKTOPDIR
270     INSTALLS += desktopfile
271
272     icon48.files = icons/48x48/$${TARGET}.png
273     icon48.path = /usr/share/icons/hicolor/48x48/apps
274     INSTALLS += icon48
275
276     icon64.files = icons/64x64/$${TARGET}.png
277     icon64.path = /usr/share/icons/hicolor/64x64/apps
278     INSTALLS += icon64
279
280     iconscalable.files = icons/scalable/$${TARGET}.svg
281     iconscalable.path = /usr/share/icons/hicolor/scalable/apps
282     INSTALLS += iconscalable
283
284     INSTALLS += i18n
285     INSTALLS += stations
286     icon80.files = icons/80x80/$${TARGET}.png
287     icon80.path = /usr/share/icons/hicolor/meegotouch/apps
288     INSTALLS += icon80
289
290     i18n.files = $$replace(TRANSLATIONS, .ts, .qm)
291     i18n.path = $$DATADIR/i18n
292     INSTALLS += i18n
293
294     stations.files = resources/stations/stations.qpl
295     stations.path = $$DATADIR/stations
296     INSTALLS += stations
297 }
298
299 !contains(USE_RESOURCES, 1) {
300     sailfish {
301         qml.files = resources/sailfish/qml/*.qml \
302                     resources/sailfish/qml/*.js \
303                     resources/sailfish/qml/pages \
304                     resources/sailfish/qml/pages/components \
305                     resources/sailfish/qml/cover
306         qml.path = $$DATADIR/qml
307         INSTALLS += qml
308     }
309     harmattan {
310         qml.files = resources/harmattan/qml/*.qml resources/harmattan/qml/*.js
311         qml.path = $$DATADIR/qml
312         INSTALLS += qml
313     }
314 }
315
316 contains(USE_RESOURCES, 1) {
317     RESOURCES += \
318         quandoparte.qrc
319 }
320
321 hack_to_fix_translations {
322     SOURCES += $$QMLSOURCES
323 }