1libxml_dep = dependency('libxml-2.0', version : '>= 2.9.2', required : get_option('ttml'))
2pango_dep = dependency('pango', required : get_option('ttml'))
3cairo_dep = dependency('cairo', required : get_option('ttml'))
4pangocairo_dep = dependency('pangocairo', required : get_option('ttml'))
5
6if libxml_dep.found() and pango_dep.found() and cairo_dep.found() and pangocairo_dep.found()
7  gstttmlsubs = library('gstttmlsubs',
8    ['subtitle.c',
9     'subtitlemeta.c',
10     'gstttmlparse.c',
11     'ttmlparse.c',
12     'gstttmlrender.c',
13     'gstttmlplugin.c'],
14    c_args : gst_plugins_bad_args,
15    include_directories : [configinc],
16    dependencies : [gstvideo_dep, libxml_dep, pango_dep, cairo_dep, pangocairo_dep, libm],
17    install : true,
18    install_dir : plugins_install_dir,
19  )
20  pkgconfig.generate(gstttmlsubs, install_dir : plugins_pkgconfig_install_dir)
21endif
22