• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1shm_sources = [
2  'shmpipe.c',
3  'shmalloc.c',
4  'gstshm.c',
5  'gstshmsrc.c',
6  'gstshmsink.c',
7]
8
9shm_deps = []
10shm_enabled = false
11if get_option('shm').disabled()
12  subdir_done()
13endif
14
15# NetBSD has shm_* in librt
16if ['darwin', 'ios', 'freebsd', 'openbsd'].contains(host_system)
17  rt_dep = []
18  shm_enabled = true
19else
20  rt_dep = cc.find_library ('rt', required: false)
21  shm_enabled = rt_dep.found()
22endif
23
24if shm_enabled
25  shm_enabled = cc.has_header('sys/socket.h')
26elif get_option('shm').enabled()
27  error('shm plugin enabled but librt not found')
28endif
29
30if not shm_enabled and get_option('shm').enabled()
31  error('shm plugin enabled but socket.h not found')
32endif
33
34if shm_enabled
35  gstshm = library('gstshm',
36    shm_sources,
37    c_args : gst_plugins_bad_args + ['-DSHM_PIPE_USE_GLIB'],
38    include_directories : [configinc],
39    dependencies : [gstbase_dep, rt_dep] + network_deps,
40    install : true,
41    install_dir : plugins_install_dir,
42  )
43  pkgconfig.generate(gstshm, install_dir : plugins_pkgconfig_install_dir)
44  plugins += [gstshm]
45endif
46