gstreamer/sys/shm/meson.build
Nirbheek Chauhan b55dfb5313 Add feature options for almost all plugins
The only plugins remaining are those that haven't been ported to Meson
yet, and msdk. Also, the tests are still automagic.

https://bugzilla.gnome.org/show_bug.cgi?id=795107
2018-07-27 19:04:38 +05:30

42 lines
945 B
Meson

shm_sources = [
'shmpipe.c',
'shmalloc.c',
'gstshm.c',
'gstshmsrc.c',
'gstshmsink.c',
]
if get_option('shm').disabled()
subdir_done()
endif
shm_deps = []
if ['osx', 'bsd'].contains(host_system)
rt_dep = []
shm_enabled = true
else
rt_dep = cc.find_library ('rt', required: false)
shm_enabled = rt_dep.found()
endif
if shm_enabled
shm_enabled = cc.has_header('sys/socket.h')
elif get_option('shm').enabled()
error('shm plugin enabled but librt not found')
endif
if not shm_enabled and get_option('shm').enabled()
error('shm plugin enabled but socket.h not found')
endif
if shm_enabled
gstshm = library('gstshm',
shm_sources,
c_args : gst_plugins_bad_args + ['-DSHM_PIPE_USE_GLIB'],
include_directories : [configinc],
dependencies : [gstbase_dep, rt_dep],
install : true,
install_dir : plugins_install_dir,
)
pkgconfig.generate(gstshm, install_dir : plugins_pkgconfig_install_dir)
endif