build: Move GStreamer dependency checks

Put them where all the other checks go so that it's easy for people
reading build files to see what GTK depends on.

Also reindent properly.
This commit is contained in:
Benjamin Otte 2024-04-29 14:14:31 +02:00 committed by Benjamin Otte
parent 4bcd2c75cc
commit ce352b5538
2 changed files with 20 additions and 21 deletions

View File

@ -411,21 +411,27 @@ if win32_enabled
pangowin32_dep = dependency('pangowin32') pangowin32_dep = dependency('pangowin32')
endif endif
pangocairo_dep = dependency('pangocairo', version: pango_req) pangocairo_dep = dependency('pangocairo', version: pango_req)
pixbuf_dep = dependency('gdk-pixbuf-2.0', version: gdk_pixbuf_req, pixbuf_dep = dependency('gdk-pixbuf-2.0', version: gdk_pixbuf_req,
default_options: ['png=enabled', 'jpeg=enabled', 'builtin_loaders=png,jpeg', 'man=false']) default_options: ['png=enabled', 'jpeg=enabled', 'builtin_loaders=png,jpeg', 'man=false'])
png_dep = dependency('libpng', 'png') png_dep = dependency('libpng', 'png')
tiff_dep = dependency('libtiff-4', 'tiff') tiff_dep = dependency('libtiff-4', 'tiff')
jpeg_dep = dependency('libjpeg', 'jpeg') jpeg_dep = dependency('libjpeg', 'jpeg')
epoxy_dep = dependency('epoxy', version: epoxy_req) epoxy_dep = dependency('epoxy', version: epoxy_req)
xkbdep = dependency('xkbcommon', version: xkbcommon_req, required: wayland_enabled) xkbdep = dependency('xkbcommon', version: xkbcommon_req, required: wayland_enabled)
graphene_dep = dependency('graphene-gobject-1.0', version: graphene_req, graphene_dep = dependency('graphene-gobject-1.0', version: graphene_req,
default_options: ['tests=false', 'gobject_types=true']) default_options: ['tests=false', 'gobject_types=true'])
iso_codes_dep = dependency('iso-codes', required: false) iso_codes_dep = dependency('iso-codes', required: false)
gi_dep = dependency('gobject-introspection-1.0', version: introspection_req, gi_dep = dependency('gobject-introspection-1.0', version: introspection_req,
required: get_option('introspection').enabled() and required: get_option('introspection').enabled() and
get_option('build-tests')) get_option('build-tests'))
gstplayer_dep = dependency('gstreamer-player-1.0', version: gstreamer_req,
required: get_option('media-gstreamer'))
gstgl_dep = dependency('gstreamer-gl-1.0', version: gstreamer_req,
required: get_option('media-gstreamer'))
gstallocators_dep = dependency('gstreamer-allocators-1.0', version: gstreamer_req,
required: get_option('media-gstreamer'))
fontconfig_dep = [] # only used in x11 backend fontconfig_dep = [] # only used in x11 backend

View File

@ -5,13 +5,6 @@ media_backends = []
extra_c_args = ['-DGTK_COMPILATION'] extra_c_args = ['-DGTK_COMPILATION']
extra_c_args += common_cflags extra_c_args += common_cflags
gstplayer_dep = dependency('gstreamer-player-1.0', version: gstreamer_req,
required: get_option('media-gstreamer'))
gstgl_dep = dependency('gstreamer-gl-1.0', version: gstreamer_req,
required: get_option('media-gstreamer'))
gstallocators_dep = dependency('gstreamer-allocators-1.0', version: gstreamer_req,
required: get_option('media-gstreamer'))
if gstplayer_dep.found() and gstgl_dep.found() and gstallocators_dep.found() if gstplayer_dep.found() and gstgl_dep.found() and gstallocators_dep.found()
extra_win_cflags = [] extra_win_cflags = []