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