1srt_sources = [
2  'gstsrt.c',
3  'gstsrtobject.c',
4  'gstsrtsink.c',
5  'gstsrtsrc.c'
6]
7srt_option = get_option('srt')
8if srt_option.disabled()
9  subdir_done()
10endif
11
12srt_dep = dependency('srt', required : false)
13if not srt_dep.found() and cc.has_header_symbol('srt/srt.h', 'srt_startup')
14  srt_dep = cc.find_library('srt', required : false)
15endif
16if not srt_dep.found() and srt_option.enabled()
17  error('srt plugin enabled, but srt library not found')
18endif
19
20if srt_dep.found()
21  gstsrt_enums = gnome.mkenums_simple('gstsrt-enumtypes',
22    sources: ['gstsrt-enums.h'],
23    decorator : 'G_GNUC_INTERNAL',
24    install_header: false)
25
26  gstsrt = library('gstsrt',
27    srt_sources, gstsrt_enums,
28    c_args : gst_plugins_bad_args,
29    link_args : noseh_link_args,
30    include_directories : [configinc, libsinc],
31    dependencies : [gstbase_dep, gio_dep, srt_dep],
32    install : true,
33    install_dir : plugins_install_dir,
34  )
35  pkgconfig.generate(gstsrt, install_dir : plugins_pkgconfig_install_dir)
36endif
37