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