weston/remoting/meson.build
Daniel Stone 4b8b60ebfd remoting: Use DRM FourCC formats instead of GBM formats
The remoting plugin currently has a set_gbm_format() hook, which accepts
GBM_FORMAT_* tokens from the host to set as a supported format.
GBM_FORMAT_* values are strictly aliased with DRM_FORMAT_*.

In order to avoid an extra unnecessary dependency from the remoting
plugin on GBM, switch to using the formats from libdrm instead.

This fixes a compile error seen when the remoting plugin is enabled:

    ../remoting/remoting-plugin.c:39:10: fatal error: gbm.h: No such file or directory
       39 | #include <gbm.h>
          |          ^~~~~~~
    compilation terminated.

The error was caused by not having any dependency at all on GBM from
the remoting backend, which is fixed here by adding a new dependency on
the libdrm headers for drm_fourcc.h.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2019-11-11 10:54:17 +00:00

33 lines
1020 B
Meson

if get_option('remoting')
user_hint = 'If you rather not build this, set \'-Dremoting=false\'.'
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)
endif
depnames = [
'gstreamer-1.0', 'gstreamer-allocators-1.0',
'gstreamer-app-1.0', 'gstreamer-video-1.0',
'gobject-2.0', 'glib-2.0'
]
deps_remoting = [ dep_libweston_private, dep_libdrm_headers ]
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',
include_directories: common_inc,
dependencies: deps_remoting,
name_prefix: '',
install: true,
install_dir: dir_module_libweston
)
env_modmap += 'remoting-plugin.so=@0@;'.format(plugin_remoting.full_path())
endif