Move files from gst-plugins-bad into the "subprojects/gst-plugins-bad/" subdir
[platform/upstream/gstreamer.git] / subprojects / gst-plugins-bad / sys / va / meson.build
1 va_sources = [
2   'plugin.c',
3   'gstvaallocator.c',
4   'gstvabasedec.c',
5   'gstvabasetransform.c',
6   'gstvacaps.c',
7   'gstvadecoder.c',
8   'gstvadeinterlace.c',
9   'gstvadevice.c',
10   'gstvadisplay_priv.c',
11   'gstvafilter.c',
12   'gstvah264dec.c',
13   'gstvah265dec.c',
14   'gstvapool.c',
15   'gstvaprofile.c',
16   'gstvautils.c',
17   'gstvavideoformat.c',
18   'gstvavp8dec.c',
19   'gstvavp9dec.c',
20   'gstvampeg2dec.c',
21   'gstvavpp.c'
22 ]
23
24 va_option = get_option('va')
25 if va_option.disabled() or host_system != 'linux'
26   subdir_done()
27 endif
28
29 if not gstva_dep.found()
30   if va_option.enabled()
31     error('The va plugin was enabled explicity, but required dependencies were not found.')
32   endif
33   subdir_done()
34 endif
35
36 # Keep av1 support optional as long as required libva version in gst-libs/va is < 1.8
37 libva_av1_req = ['>= 1.8']
38 libva_av1_dep = dependency('libva', version: libva_av1_req, required: false)
39 if libva_av1_dep.found()
40   va_sources += 'gstvaav1dec.c'
41 endif
42
43 cdata.set10('HAVE_LIBDRM', libdrm_dep.found())
44
45 driverdir = libva_dep.get_pkgconfig_variable('driverdir')
46 if driverdir == ''
47   driverdir = join_paths(get_option('prefix'), get_option('libdir'), 'dri')
48 endif
49 gstva_cargs = ['-DLIBVA_DRIVERS_PATH="' + driverdir + '"']
50
51 gstva = library('gstva',
52   va_sources,
53   c_args : gst_plugins_bad_args + extra_c_args + gstva_cargs + ['-std=c99'],
54   include_directories : [configinc],
55   dependencies : [libva_dep, gstvideo_dep, gstcodecs_dep, gstallocators_dep, gstva_dep] + extra_dep,
56   install : true,
57   install_dir : plugins_install_dir,
58 )
59 pkgconfig.generate(gstva, install_dir : plugins_pkgconfig_install_dir)
60 plugins += [gstva]