meson: add options for ximagesrc xshm, xfixes, xdamage checks
[platform/upstream/gst-plugins-good.git] / sys / ximage / meson.build
1 x11_dep = dependency('x11', required : get_option('ximagesrc'))
2
3 if x11_dep.found()
4   x_args = []
5   # FIXME: Need to check for XShmAttach inside libXext
6   xshm_dep = dependency('xext', required : get_option('ximagesrc-xshm'))
7   if xshm_dep.found()
8     x_args += ['-DHAVE_XSHM']
9   endif
10
11   xfixes_dep = dependency('xfixes', required : get_option('ximagesrc-xfixes'))
12   if xfixes_dep.found()
13     x_args += ['-DHAVE_XFIXES']
14   endif
15
16   xdamage_dep = dependency('xdamage', required : get_option('ximagesrc-xdamage'))
17   if xdamage_dep.found()
18     x_args += ['-DHAVE_XDAMAGE']
19   endif
20
21   gstximagesrc = library('gstximagesrc',
22     'gstximagesrc.c', 'ximageutil.c',
23     c_args : gst_plugins_good_args + x_args,
24     include_directories : [configinc, libsinc],
25     dependencies : [gstbase_dep, gstvideo_dep, x11_dep,
26                     xshm_dep, xfixes_dep, xdamage_dep],
27     install : true,
28     install_dir : plugins_install_dir,
29   )
30   pkgconfig.generate(gstximagesrc, install_dir : plugins_pkgconfig_install_dir)
31 endif