]> git.sur5r.net Git - minitube/blob - minitube.pro
New upstream version 3.8
[minitube] / minitube.pro
1 CONFIG += c++17 exceptions_off rtti_off object_parallel_to_source
2
3 TEMPLATE = app
4 VERSION = 3.8
5 DEFINES += APP_VERSION="$$VERSION"
6
7 APP_NAME = Minitube
8 DEFINES += APP_NAME="$$APP_NAME"
9
10 APP_UNIX_NAME = minitube
11 DEFINES += APP_UNIX_NAME="$$APP_UNIX_NAME"
12
13 message(Building $${APP_NAME} $${VERSION})
14 message(Qt $$[QT_VERSION] in $$[QT_INSTALL_PREFIX])
15
16 DEFINES += APP_SNAPSHOT
17
18 CONFIG -= debug_and_release
19 CONFIG(debug, debug|release): {
20     message(Building for debug)
21 }
22 CONFIG(release, debug|release): {
23     message(Building for release)
24     DEFINES *= QT_NO_DEBUG_OUTPUT
25     CONFIG += optimize_full
26 }
27
28 DEFINES *= QT_USE_QSTRINGBUILDER QT_STRICT_ITERATORS QT_DEPRECATED_WARNINGS
29
30 #!contains(DEFINES, APP_GOOGLE_API_KEY=.+) {
31 #    warning("You need to specify a Google API Key, refer to the README.md file for details")
32 #}
33
34 TARGET = $${APP_UNIX_NAME}
35
36 QT += widgets network sql qml
37
38 include(lib/http/http.pri)
39 include(lib/idle/idle.pri)
40 include(lib/js/js.pri)
41
42 DEFINES += MEDIA_MPV
43 include(lib/media/media.pri)
44
45 include(src/qtsingleapplication/qtsingleapplication.pri)
46 include(src/yt/yt.pri)
47
48 INCLUDEPATH += $$PWD/src
49
50 HEADERS += src/video.h \
51     src/messagebar.h \
52     src/spacer.h \
53     src/constants.h \
54     src/playlistitemdelegate.h \
55     src/subscriptionimportview.h \
56     src/updateutils.h \
57     src/videoapi.h \
58     src/videomimedata.h \
59     src/searchparams.h \
60     src/minisplitter.h \
61     src/loadingwidget.h \
62     src/autocomplete.h \
63     src/videodefinition.h \
64     src/fontutils.h \
65     src/globalshortcuts.h \
66     src/globalshortcutbackend.h \
67     src/downloadmanager.h \
68     src/downloaditem.h \
69     src/downloadview.h \
70     src/downloadmodel.h \
71     src/downloadlistview.h \
72     src/downloadsettings.h \
73     src/suggester.h \
74     src/channelsuggest.h \
75     src/temporary.h \
76     src/segmentedcontrol.h \
77     src/playlistview.h \
78     src/refinesearchwidget.h \
79     src/refinesearchbutton.h \
80     src/sidebarwidget.h \
81     src/homeview.h \
82     src/aboutview.h \
83     src/mainwindow.h \
84     src/mediaview.h \
85     src/searchview.h \
86     src/view.h \
87     src/playlistmodel.h \
88     src/videosource.h \
89     src/waitingspinnerwidget.h \
90     src/ytsearch.h \
91     src/ytstandardfeed.h \
92     src/standardfeedsview.h \
93     src/ytregions.h \
94     src/ytcategories.h \
95     src/ytsuggester.h \
96     src/videosourcewidget.h \
97     src/regionsview.h \
98     src/ytsinglevideosource.h \
99     src/sidebarheader.h \
100     src/iconutils.h \
101     src/diskcache.h \
102     src/gridwidget.h \
103     src/painterutils.h \
104     src/database.h \
105     src/channelaggregator.h \
106     src/channelmodel.h \
107     src/aggregatevideosource.h \
108     src/channelview.h \
109     src/channelitemdelegate.h \
110     src/jsfunctions.h \
111     src/seekslider.h \
112     src/snapshotsettings.h \
113     src/snapshotpreview.h \
114     src/datautils.h \
115     src/yt3listparser.h \
116     src/ytchannel.h \
117     src/yt3.h \
118     src/paginatedvideosource.h \
119     src/searchwidget.h \
120     src/channellistview.h \
121     src/httputils.h \
122     src/appwidget.h \
123     src/clickablelabel.h \
124     src/ytvideo.h \
125     src/toolbarmenu.h \
126     src/sharetoolbar.h \
127     src/videoarea.h \
128     src/searchlineedit.h
129 SOURCES += src/main.cpp \
130     src/messagebar.cpp \
131     src/spacer.cpp \
132     src/subscriptionimportview.cpp \
133     src/updateutils.cpp \
134     src/video.cpp \
135     src/videomimedata.cpp \
136     src/searchparams.cpp \
137     src/minisplitter.cpp \
138     src/loadingwidget.cpp \
139     src/autocomplete.cpp \
140     src/videodefinition.cpp \
141     src/constants.cpp \
142     src/fontutils.cpp \
143     src/globalshortcuts.cpp \
144     src/globalshortcutbackend.cpp \
145     src/downloadmanager.cpp \
146     src/downloaditem.cpp \
147     src/downloadview.cpp \
148     src/downloadmodel.cpp \
149     src/downloadlistview.cpp \
150     src/downloadsettings.cpp \
151     src/channelsuggest.cpp \
152     src/temporary.cpp \
153     src/segmentedcontrol.cpp \
154     src/playlistview.cpp \
155     src/refinesearchwidget.cpp \
156     src/refinesearchbutton.cpp \
157     src/sidebarwidget.cpp \
158     src/homeview.cpp \
159     src/mainwindow.cpp \
160     src/mediaview.cpp \
161     src/aboutview.cpp \
162     src/searchview.cpp \
163     src/playlistitemdelegate.cpp \
164     src/playlistmodel.cpp \
165     src/videosource.cpp \
166     src/waitingspinnerwidget.cpp \
167     src/ytsearch.cpp \
168     src/ytstandardfeed.cpp \
169     src/standardfeedsview.cpp \
170     src/ytregions.cpp \
171     src/ytcategories.cpp \
172     src/ytsuggester.cpp \
173     src/videosourcewidget.cpp \
174     src/regionsview.cpp \
175     src/ytsinglevideosource.cpp \
176     src/sidebarheader.cpp \
177     src/iconutils.cpp \
178     src/diskcache.cpp \
179     src/gridwidget.cpp \
180     src/painterutils.cpp \
181     src/database.cpp \
182     src/channelaggregator.cpp \
183     src/channelmodel.cpp \
184     src/aggregatevideosource.cpp \
185     src/channelview.cpp \
186     src/channelitemdelegate.cpp \
187     src/jsfunctions.cpp \
188     src/seekslider.cpp \
189     src/snapshotsettings.cpp \
190     src/snapshotpreview.cpp \
191     src/datautils.cpp \
192     src/yt3listparser.cpp \
193     src/ytchannel.cpp \
194     src/yt3.cpp \
195     src/paginatedvideosource.cpp \
196     src/channellistview.cpp \
197     src/httputils.cpp \
198     src/appwidget.cpp \
199     src/clickablelabel.cpp \
200     src/ytvideo.cpp \
201     src/toolbarmenu.cpp \
202     src/sharetoolbar.cpp \
203     src/videoarea.cpp \
204     src/searchlineedit.cpp
205
206 RESOURCES += resources.qrc
207 RESOURCES += $$files(icons/*.png, true)
208
209 DESTDIR = build/target/
210 OBJECTS_DIR = build/obj/
211 MOC_DIR = build/moc/
212 RCC_DIR = build/rcc/
213
214 # Tell Qt Linguist that we use UTF-8 strings in our sources
215 CODECFORTR = UTF-8
216 CODECFORSRC = UTF-8
217
218 include(locale/locale.pri)
219
220 # deploy
221 DISTFILES += CHANGES COPYING
222 unix:!mac {
223     DEFINES += APP_LINUX
224     QT += dbus
225     HEADERS += src/gnomeglobalshortcutbackend.h
226     SOURCES += src/gnomeglobalshortcutbackend.cpp
227
228     isEmpty(PREFIX):PREFIX = /usr
229
230     BINDIR = $$PREFIX/bin
231     INSTALLS += target
232     target.path = $$BINDIR
233
234     DATADIR = $$PREFIX/share
235     PKGDATADIR = $$DATADIR/minitube
236     DEFINES += DATADIR=\\\"$$DATADIR\\\" \
237         PKGDATADIR=\\\"$$PKGDATADIR\\\"
238
239     INSTALLS += translations \
240         sounds \
241         desktop \
242         appdata \
243         iconsvg \
244         icon16 \
245         icon22 \
246         icon32 \
247         icon48 \
248         icon64 \
249         icon128 \
250         icon256 \
251         icon512
252     translations.path = $$PKGDATADIR
253     translations.files += $$DESTDIR/locale
254     sounds.path = $$PKGDATADIR
255     sounds.files += sounds/
256     desktop.path = $$DATADIR/applications
257     desktop.files += minitube.desktop
258     appdata.path = $$DATADIR/metainfo
259     appdata.files += org.tordini.flavio.minitube.metainfo.xml
260     iconsvg.path = $$DATADIR/icons/hicolor/scalable/apps
261     iconsvg.files += data/minitube.svg
262     icon16.path = $$DATADIR/icons/hicolor/16x16/apps
263     icon16.files += data/16x16/minitube.png
264     icon22.path = $$DATADIR/icons/hicolor/22x22/apps
265     icon22.files += data/22x22/minitube.png
266     icon32.path = $$DATADIR/icons/hicolor/32x32/apps
267     icon32.files += data/32x32/minitube.png
268     icon48.path = $$DATADIR/icons/hicolor/48x48/apps
269     icon48.files += data/48x48/minitube.png
270     icon64.path = $$DATADIR/icons/hicolor/64x64/apps
271     icon64.files += data/64x64/minitube.png
272     icon128.path = $$DATADIR/icons/hicolor/128x128/apps
273     icon128.files += data/128x128/minitube.png
274     icon256.path = $$DATADIR/icons/hicolor/256x256/apps
275     icon256.files += data/256x256/minitube.png
276     icon512.path = $$DATADIR/icons/hicolor/512x512/apps
277     icon512.files += data/512x512/minitube.png
278 }
279
280 mac|win32|contains(DEFINES, APP_UBUNTU):include(local/local.pri)
281
282 message(QT: $$QT)
283 message(CONFIG: $$CONFIG)
284 message(DEFINES: $$DEFINES)
285 message(QMAKE_CXXFLAGS: $$QMAKE_CXXFLAGS)
286 message(QMAKE_LFLAGS: $$QMAKE_LFLAGS)