1 CONFIG += c++17 exceptions_off rtti_off optimize_full object_parallel_to_source
5 DEFINES += APP_VERSION="$$VERSION"
8 DEFINES += APP_NAME="$$APP_NAME"
10 APP_UNIX_NAME = minitube
11 DEFINES += APP_UNIX_NAME="$$APP_UNIX_NAME"
13 message(Building $${APP_NAME} $${VERSION})
14 message(Qt $$[QT_VERSION] in $$[QT_INSTALL_PREFIX])
16 DEFINES += APP_SNAPSHOT
18 CONFIG -= debug_and_release
19 CONFIG(debug, debug|release): {
20 message(Building for debug)
22 CONFIG(release, debug|release): {
23 message(Building for release)
24 DEFINES *= QT_NO_DEBUG_OUTPUT
27 DEFINES *= QT_USE_QSTRINGBUILDER QT_STRICT_ITERATORS QT_DEPRECATED_WARNINGS
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")
33 TARGET = $${APP_UNIX_NAME}
35 QT += widgets network sql qml
37 include(lib/http/http.pri)
38 include(lib/idle/idle.pri)
41 include(lib/media/media.pri)
43 include(src/qtsingleapplication/qtsingleapplication.pri)
44 include(src/invidious/invidious.pri)
45 include(src/ytjs/ytjs.pri)
47 INCLUDEPATH += $$PWD/src
49 HEADERS += src/video.h \
53 src/playlistitemdelegate.h \
61 src/videodefinition.h \
63 src/globalshortcuts.h \
64 src/globalshortcutbackend.h \
65 src/downloadmanager.h \
69 src/downloadlistview.h \
70 src/downloadsettings.h \
72 src/channelsuggest.h \
74 src/segmentedcontrol.h \
76 src/refinesearchwidget.h \
77 src/refinesearchbutton.h \
87 src/waitingspinnerwidget.h \
89 src/ytstandardfeed.h \
90 src/standardfeedsview.h \
94 src/videosourcewidget.h \
96 src/ytsinglevideosource.h \
103 src/channelaggregator.h \
105 src/aggregatevideosource.h \
107 src/channelitemdelegate.h \
110 src/snapshotsettings.h \
111 src/snapshotpreview.h \
113 src/yt3listparser.h \
116 src/paginatedvideosource.h \
118 src/channellistview.h \
121 src/clickablelabel.h \
127 SOURCES += src/main.cpp \
130 src/updateutils.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 \
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 \
150 src/segmentedcontrol.cpp \
151 src/playlistview.cpp \
152 src/refinesearchwidget.cpp \
153 src/refinesearchbutton.cpp \
154 src/sidebarwidget.cpp \
160 src/playlistitemdelegate.cpp \
161 src/playlistmodel.cpp \
162 src/videosource.cpp \
163 src/waitingspinnerwidget.cpp \
165 src/ytstandardfeed.cpp \
166 src/standardfeedsview.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 \
177 src/painterutils.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 \
186 src/snapshotsettings.cpp \
187 src/snapshotpreview.cpp \
189 src/yt3listparser.cpp \
192 src/paginatedvideosource.cpp \
193 src/channellistview.cpp \
196 src/clickablelabel.cpp \
198 src/toolbarmenu.cpp \
199 src/sharetoolbar.cpp \
201 src/searchlineedit.cpp
203 RESOURCES += resources.qrc
204 RESOURCES += $$files(icons/*.png, true)
206 DESTDIR = build/target/
207 OBJECTS_DIR = build/obj/
211 # Tell Qt Linguist that we use UTF-8 strings in our sources
215 include(locale/locale.pri)
218 DISTFILES += CHANGES COPYING
222 HEADERS += src/gnomeglobalshortcutbackend.h
223 SOURCES += src/gnomeglobalshortcutbackend.cpp
225 isEmpty(PREFIX):PREFIX = /usr
227 BINDIR = $$PREFIX/bin
229 target.path = $$BINDIR
231 DATADIR = $$PREFIX/share
232 PKGDATADIR = $$DATADIR/minitube
233 DEFINES += DATADIR=\\\"$$DATADIR\\\" \
234 PKGDATADIR=\\\"$$PKGDATADIR\\\"
236 INSTALLS += translations \
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
277 mac|win32|contains(DEFINES, APP_UBUNTU):include(local/local.pri)
279 !contains(DEFINES, APP_MAC_STORE) {
280 # DEFINES += UPDATER_NO_SPARKLE
281 include(lib/updater/updater.pri)
284 message(CONFIG: $$CONFIG)
285 message(DEFINES: $$DEFINES)
286 message(QMAKE_CXXFLAGS: $$QMAKE_CXXFLAGS)
287 message(QMAKE_LFLAGS: $$QMAKE_LFLAGS)