From 784c20c82fb6fb84c5ce49993b5a2ec0bda13475 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Wed, 22 Aug 2018 20:27:37 +1200 Subject: Use new options for X11 backend and Xwayland --- xwayland/meson.build | 41 ++++++++++++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 7 deletions(-) (limited to 'xwayland') diff --git a/xwayland/meson.build b/xwayland/meson.build index ec486f58..637f565e 100644 --- a/xwayland/meson.build +++ b/xwayland/meson.build @@ -1,3 +1,33 @@ +xwayland_libs = [] +xwayland_required = [ + 'xcb', + 'xcb-composite', + 'xcb-render', + 'xcb-xfixes', +] +xwayland_optional = [ + 'xcb-errors', + 'xcb-icccm', +] + +foreach lib : xwayland_required + dep = dependency(lib, required: get_option('xwayland')) + if not dep.found() + exclude_headers += 'xwayland.h' + subdir_done() + endif + + xwayland_libs += dep +endforeach + +foreach lib : xwayland_optional + dep = dependency(lib, required: get_option(lib)) + if dep.found() + xwayland_libs += dep + conf_data.set('WLR_HAS_' + lib.underscorify().to_upper(), true) + endif +endforeach + lib_wlr_xwayland = static_library( 'wlr_xwayland', files( @@ -12,14 +42,11 @@ lib_wlr_xwayland = static_library( include_directories: wlr_inc, dependencies: [ wayland_server, - xcb, - xcb_composite, - xcb_xfixes, - xcb_image, - xcb_render, - xcb_icccm, - xcb_errors, + xwayland_libs, xkbcommon, pixman, ], ) + +wlr_parts += lib_wlr_xwayland +conf_data.set('WLR_HAS_XWAYLAND', true) -- cgit v1.2.3 From 51892e0d7483d57b1e5eadae88e967e72e968cc0 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Wed, 22 Aug 2018 21:14:07 +1200 Subject: Install headers explicitly --- include/wlr/backend/meson.build | 16 +++++++++++++ include/wlr/backend/session/meson.build | 1 + include/wlr/interfaces/meson.build | 10 ++++++++ include/wlr/meson.build | 19 ++++++++++++--- include/wlr/render/meson.build | 9 +++++++ include/wlr/types/meson.build | 42 +++++++++++++++++++++++++++++++++ include/wlr/util/meson.build | 6 +++++ meson.build | 13 ++++------ xwayland/meson.build | 1 - 9 files changed, 104 insertions(+), 13 deletions(-) create mode 100644 include/wlr/backend/meson.build create mode 100644 include/wlr/backend/session/meson.build create mode 100644 include/wlr/interfaces/meson.build create mode 100644 include/wlr/render/meson.build create mode 100644 include/wlr/types/meson.build create mode 100644 include/wlr/util/meson.build (limited to 'xwayland') diff --git a/include/wlr/backend/meson.build b/include/wlr/backend/meson.build new file mode 100644 index 00000000..e005b854 --- /dev/null +++ b/include/wlr/backend/meson.build @@ -0,0 +1,16 @@ +install_headers( + 'drm.h', + 'headless.h', + 'interface.h', + 'libinput.h', + 'multi.h', + 'session.h', + 'wayland.h', + subdir: 'wlr/backend', +) + +if conf_data.get('WLR_HAS_X11_BACKEND', false) + install_headers('x11.h', subdir: 'wlr/backend') +endif + +subdir('session') diff --git a/include/wlr/backend/session/meson.build b/include/wlr/backend/session/meson.build new file mode 100644 index 00000000..21b5a96b --- /dev/null +++ b/include/wlr/backend/session/meson.build @@ -0,0 +1 @@ +install_headers('interface.h', subdir: 'wlr/backend/session') diff --git a/include/wlr/interfaces/meson.build b/include/wlr/interfaces/meson.build new file mode 100644 index 00000000..207896b5 --- /dev/null +++ b/include/wlr/interfaces/meson.build @@ -0,0 +1,10 @@ +install_headers( + 'wlr_input_device.h', + 'wlr_keyboard.h', + 'wlr_output.h', + 'wlr_pointer.h', + 'wlr_tablet_pad.h', + 'wlr_tablet_tool.h', + 'wlr_touch.h', + subdir: 'wlr/interfaces', +) diff --git a/include/wlr/meson.build b/include/wlr/meson.build index 6259c311..14551cb4 100644 --- a/include/wlr/meson.build +++ b/include/wlr/meson.build @@ -9,6 +9,19 @@ version_data.set('WLR_VERSION_API_CURRENT', so_version[0]) version_data.set('WLR_VERSION_API_REVISION', so_version[1]) version_data.set('WLR_VERSION_API_AGE', so_version[2]) -wlr_inc_dest = join_paths(get_option('includedir'), 'wlr') -configure_file(output: 'config.h', install_dir: wlr_inc_dest, configuration: conf_data) -configure_file(output: 'version.h', install_dir: wlr_inc_dest, configuration: version_data) +install_headers( + configure_file(output: 'config.h', configuration: conf_data), + configure_file(output: 'version.h', configuration: version_data), + 'backend.h', + 'xcursor.h', + subdir: 'wlr' +) +if conf_data.get('WLR_HAS_XWAYLAND', false) + install_headers('xwayland.h', subdir: 'wlr') +endif + +subdir('backend') +subdir('interfaces') +subdir('render') +subdir('types') +subdir('util') diff --git a/include/wlr/render/meson.build b/include/wlr/render/meson.build new file mode 100644 index 00000000..05127bb7 --- /dev/null +++ b/include/wlr/render/meson.build @@ -0,0 +1,9 @@ +install_headers( + 'dmabuf.h', + 'egl.h', + 'gles2.h', + 'interface.h', + 'wlr_renderer.h', + 'wlr_texture.h', + subdir: 'wlr/render' +) diff --git a/include/wlr/types/meson.build b/include/wlr/types/meson.build new file mode 100644 index 00000000..8c81cb0e --- /dev/null +++ b/include/wlr/types/meson.build @@ -0,0 +1,42 @@ +install_headers( + 'wlr_box.h', + 'wlr_buffer.h', + 'wlr_compositor.h', + 'wlr_cursor.h', + 'wlr_data_device.h', + 'wlr_export_dmabuf_v1.h', + 'wlr_gamma_control.h', + 'wlr_gamma_control_v1.h', + 'wlr_idle.h', + 'wlr_idle_inhibit_v1.h', + 'wlr_input_device.h', + 'wlr_input_inhibitor.h', + 'wlr_keyboard.h', + 'wlr_layer_shell.h', + 'wlr_linux_dmabuf_v1.h', + 'wlr_list.h', + 'wlr_matrix.h', + 'wlr_output.h', + 'wlr_output_damage.h', + 'wlr_output_layout.h', + 'wlr_pointer.h', + 'wlr_primary_selection.h', + 'wlr_region.h', + 'wlr_screencopy_v1.h', + 'wlr_screenshooter.h', + 'wlr_seat.h', + 'wlr_server_decoration.h', + 'wlr_surface.h', + 'wlr_tablet_pad.h', + 'wlr_tablet_tool.h', + 'wlr_tablet_v2.h', + 'wlr_touch.h', + 'wlr_virtual_keyboard_v1.h', + 'wlr_wl_shell.h', + 'wlr_xcursor_manager.h', + 'wlr_xdg_decoration_v1.h', + 'wlr_xdg_output.h', + 'wlr_xdg_shell.h', + 'wlr_xdg_shell_v6.h', + subdir: 'wlr/types', +) diff --git a/include/wlr/util/meson.build b/include/wlr/util/meson.build new file mode 100644 index 00000000..ee72cbd6 --- /dev/null +++ b/include/wlr/util/meson.build @@ -0,0 +1,6 @@ +install_headers( + 'edges.h', + 'log.h', + 'region.h', + subdir: 'wlr/util', +) diff --git a/meson.build b/meson.build index d31296f7..06605189 100644 --- a/meson.build +++ b/meson.build @@ -58,7 +58,6 @@ libcap = dependency('libcap', required: get_option('libcap')) logind = dependency('lib' + get_option('logind-provider'), required: get_option('logind')) math = cc.find_library('m', required: false) -exclude_headers = [] wlr_parts = [] wlr_deps = [] @@ -78,18 +77,14 @@ endif subdir('protocol') subdir('render') -subdir('backend') -subdir('xwayland') - -includedir = get_option('includedir') -exclude_headers += 'meson.build' -install_subdir('include/wlr', install_dir: includedir, exclude_files: exclude_headers) - -subdir('include') +subdir('backend') subdir('types') subdir('util') subdir('xcursor') +subdir('xwayland') + +subdir('include') wlr_parts += [ lib_wl_protos, diff --git a/xwayland/meson.build b/xwayland/meson.build index 637f565e..0bd88924 100644 --- a/xwayland/meson.build +++ b/xwayland/meson.build @@ -13,7 +13,6 @@ xwayland_optional = [ foreach lib : xwayland_required dep = dependency(lib, required: get_option('xwayland')) if not dep.found() - exclude_headers += 'xwayland.h' subdir_done() endif -- cgit v1.2.3