• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2if not get_option('backend-x11')
3	subdir_done()
4endif
5
6config_h.set('BUILD_X11_COMPOSITOR', '1')
7
8srcs_x11 = [
9	'x11.c',
10	presentation_time_server_protocol_h,
11]
12
13dep_x11_xcb = dependency('xcb', version: '>= 1.8', required: false)
14if not dep_x11_xcb.found()
15	error('x11-backend requires xcb >= 1.8 which was not found. Or, you can use \'-Dbackend-x11=false\'.')
16endif
17
18deps_x11 = [
19	dep_libweston_private,
20	dep_libdrm_headers,
21	dep_x11_xcb,
22	dep_lib_cairo_shared,
23	dep_pixman,
24]
25
26foreach name : [ 'xcb-shm', 'x11', 'x11-xcb' ]
27	d = dependency(name, required: false)
28	if not d.found()
29		error('x11-backend requires @0@ which was not found. Or, you can use \'-Dbackend-x11=false\'.'.format(name))
30	endif
31	deps_x11 += d
32endforeach
33
34dep_xcb_xkb = dependency('xcb-xkb', version: '>= 1.9', required: false)
35if dep_xcb_xkb.found()
36	deps_x11 += dep_xcb_xkb
37	config_h.set('HAVE_XCB_XKB', '1')
38endif
39
40if get_option('renderer-gl')
41	if not dep_egl.found()
42		error('x11-backend + gl-renderer requires egl which was not found. Or, you can use \'-Dbackend-x11=false\' or \'-Drenderer-gl=false\'.')
43	endif
44	deps_x11 += dep_egl
45endif
46
47plugin_x11 = shared_library(
48	'x11-backend',
49	srcs_x11,
50	include_directories: common_inc,
51	dependencies: deps_x11,
52	name_prefix: '',
53	install: true,
54	install_dir: dir_module_libweston
55)
56env_modmap += 'x11-backend.so=@0@;'.format(plugin_x11.full_path())
57
58install_headers(backend_x11_h, subdir: dir_include_libweston_install)
59