• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1if get_option('pipewire')
2	user_hint = 'If you rather not build this, set "pipewire=false".'
3
4	if not get_option('backend-drm')
5		error('Attempting to build the pipewire plugin without the required DRM backend. ' + user_hint)
6	endif
7
8	depnames = [
9		'libpipewire-0.2', 'libspa-0.1'
10	]
11	deps_pipewire = [ dep_libweston_private ]
12	foreach depname : depnames
13		dep = dependency(depname, required: false)
14		if not dep.found()
15			error('Pipewire plugin requires @0@ which was not found. '.format(depname) + user_hint)
16		endif
17		deps_pipewire += dep
18	endforeach
19
20	plugin_pipewire = shared_library(
21		'pipewire-plugin',
22		'pipewire-plugin.c',
23		include_directories: common_inc,
24		dependencies: deps_pipewire,
25		name_prefix: '',
26		install: true,
27		install_dir: dir_module_libweston
28	)
29	env_modmap += 'pipewire-plugin.so=@0@;'.format(plugin_pipewire.full_path())
30	install_headers('pipewire-plugin.h', subdir: dir_include_libweston_install)
31endif
32