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