1sctp_sources = [
2  'gstsctpdec.c',
3  'gstsctpenc.c',
4  'gstsctpplugin.c',
5  'sctpassociation.c'
6]
7
8if get_option('sctp').disabled()
9  subdir_done()
10endif
11
12sctp_platform_deps = []
13
14sctp_dep = cc.find_library('usrsctp', required : get_option('sctp').enabled())
15sctp_header = cc.has_header('usrsctp.h')
16if host_system == 'windows'
17  sctp_platform_deps += [cc.find_library('ws2_32')]
18endif
19
20if get_option('sctp').enabled()
21  if not sctp_dep.found() or not sctp_header
22    error('sctp plugin enabled but could not find libusrsctp')
23  endif
24endif
25
26if sctp_dep.found() and sctp_header
27  gstsctp = library('gstsctp',
28    sctp_sources,
29    c_args : gst_plugins_bad_args,
30    include_directories : [configinc],
31    dependencies : [sctp_dep, gst_dep, gstbase_dep, gstsctp_dep, sctp_platform_deps],
32    install : true,
33    install_dir : plugins_install_dir,
34  )
35  pkgconfig.generate(gstsctp, install_dir : plugins_pkgconfig_install_dir)
36endif
37