summaryrefslogtreecommitdiff
path: root/pipewire/meson.build
blob: 7f155b49b0d62dedbd6dc47487c69f65184acca9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
if get_option('pipewire')
	user_hint = 'If you rather not build this, set \'-Dpipewire=false\'.'

	if not get_option('backend-drm')
		error('Attempting to build the pipewire plugin without the required DRM backend. ' + user_hint)
	endif

	deps_pipewire = [ dep_libweston_private ]

	dep_libpipewire = dependency('libpipewire-0.3', required: false)
	if not dep_libpipewire.found()
		error('Pipewire plugin requires libpipewire which was not found. ' + user_hint)
	endif
	deps_pipewire += dep_libpipewire

	dep_libspa = dependency('libspa-0.2', required: false)
	if not dep_libspa.found()
		error('Pipewire plugin requires libspa which was not found. ' + user_hint)
	endif
	deps_pipewire += dep_libspa

	plugin_pipewire = shared_library(
		'pipewire-plugin',
		'pipewire-plugin.c',
		include_directories: common_inc,
		dependencies: deps_pipewire,
		name_prefix: '',
		install: true,
		install_dir: dir_module_libweston
	)
	env_modmap += 'pipewire-plugin.so=@0@;'.format(plugin_pipewire.full_path())
endif