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