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