meson.build 1020 Bytes
Newer Older
Daniel Stone's avatar
Daniel Stone committed
1
if get_option('remoting')
2
	user_hint = 'If you rather not build this, set \'-Dremoting=false\'.'
Daniel Stone's avatar
Daniel Stone committed
3

4 5
	if not get_option('backend-drm') or not get_option('renderer-gl')
		error('Attempting to build the remoting plugin without the required DRM backend and GL renderer. ' + user_hint)
Daniel Stone's avatar
Daniel Stone committed
6 7 8 9
	endif

	depnames = [
		'gstreamer-1.0', 'gstreamer-allocators-1.0',
10 11
		'gstreamer-app-1.0', 'gstreamer-video-1.0',
		'gobject-2.0', 'glib-2.0'
Daniel Stone's avatar
Daniel Stone committed
12
	]
13
	deps_remoting = [ dep_libweston_private, dep_libdrm_headers ]
Daniel Stone's avatar
Daniel Stone committed
14 15 16 17 18 19 20 21 22 23 24
	foreach depname : depnames
		dep = dependency(depname, required: false)
		if not dep.found()
			error('Remoting plugin requires @0@ which was not found. '.format(depname) + user_hint)
		endif
		deps_remoting += dep
	endforeach

	plugin_remoting = shared_library(
		'remoting-plugin',
		'remoting-plugin.c',
25
		include_directories: common_inc,
Daniel Stone's avatar
Daniel Stone committed
26 27 28 29 30 31 32
		dependencies: deps_remoting,
		name_prefix: '',
		install: true,
		install_dir: dir_module_libweston
	)
	env_modmap += 'remoting-plugin.so=@0@;'.format(plugin_remoting.full_path())
endif