4f5e360180
Define common_inc which includes both public_inc and the project root directory. The project root directory will allow access to config.h and all the shared/ headers. Replacing all custom '.', '..', '../..', '../shared' etc. include paths with common_inc reduces clutter in the target definitions and enforces the common #include directive style, as e.g. including shared/ headers without the subdirectory name no longer works. Unfortunately this does not prevent one from using private libweston headers with the usual include pattern for public headers. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
58 lines
1.4 KiB
Meson
58 lines
1.4 KiB
Meson
|
|
if not get_option('backend-x11')
|
|
subdir_done()
|
|
endif
|
|
|
|
config_h.set('BUILD_X11_COMPOSITOR', '1')
|
|
|
|
srcs_x11 = [
|
|
'x11.c',
|
|
presentation_time_server_protocol_h,
|
|
]
|
|
|
|
dep_x11_xcb = dependency('xcb', version: '>= 1.8', required: false)
|
|
if not dep_x11_xcb.found()
|
|
error('x11-backend requires xcb >= 1.8 which was not found. Or, you can use \'-Dbackend-x11=false\'.')
|
|
endif
|
|
|
|
deps_x11 = [
|
|
dep_libweston,
|
|
dep_x11_xcb,
|
|
dep_lib_cairo_shared,
|
|
dep_pixman,
|
|
]
|
|
|
|
foreach name : [ 'xcb-shm', 'x11', 'x11-xcb' ]
|
|
d = dependency(name, required: false)
|
|
if not d.found()
|
|
error('x11-backend requires @0@ which was not found. Or, you can use \'-Dbackend-x11=false\'.'.format(name))
|
|
endif
|
|
deps_x11 += d
|
|
endforeach
|
|
|
|
dep_xcb_xkb = dependency('xcb-xkb', version: '>= 1.9', required: false)
|
|
if dep_xcb_xkb.found()
|
|
deps_x11 += dep_xcb_xkb
|
|
config_h.set('HAVE_XCB_XKB', '1')
|
|
endif
|
|
|
|
if get_option('renderer-gl')
|
|
if not dep_egl.found()
|
|
error('x11-backend + gl-renderer requires egl which was not found. Or, you can use \'-Dbackend-x11=false\' or \'-Drenderer-gl=false\'.')
|
|
endif
|
|
deps_x11 += dep_egl
|
|
endif
|
|
|
|
plugin_x11 = shared_library(
|
|
'x11-backend',
|
|
srcs_x11,
|
|
include_directories: common_inc,
|
|
dependencies: deps_x11,
|
|
name_prefix: '',
|
|
install: true,
|
|
install_dir: dir_module_libweston
|
|
)
|
|
env_modmap += 'x11-backend.so=@0@;'.format(plugin_x11.full_path())
|
|
|
|
install_headers(backend_x11_h, subdir: dir_include_libweston_install)
|