diff options
author | Руслан Ижбулатов <lrn1986@gmail.com> | 2018-03-03 21:55:15 +0000 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2018-03-28 15:39:20 +0800 |
commit | b7d7602750acad857b638811b7a9096982460b27 (patch) | |
tree | c4e0bb49e64e76d420226df139df1893be4541c4 | |
parent | b1b05bee5393c57cb16cbd4172d467ab96533048 (diff) | |
download | gtk+-b7d7602750acad857b638811b7a9096982460b27.tar.gz |
Make wayland bits in meson.build conditional on wayland use
Otherwise the build won't configure due to its inability to find
wayland-scanner program on systems where no such program is availble.
https://bugzilla.gnome.org/show_bug.cgi?id=773299
-rw-r--r-- | gtk/meson.build | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/gtk/meson.build b/gtk/meson.build index a0b3932d57..fa1f7b2908 100644 --- a/gtk/meson.build +++ b/gtk/meson.build @@ -596,8 +596,10 @@ proto_sources = [ ] im_wayland_sources = files('gtkimcontextwayland.c') -wayland_scanner = find_program('wayland-scanner') -genprotocols = find_program('../gdk/wayland/genprotocolfiles.py') +if wayland_enabled + wayland_scanner = find_program('wayland-scanner') + genprotocols = find_program('../gdk/wayland/genprotocolfiles.py') +endif foreach p: proto_sources proto_name = p.get(0) @@ -612,25 +614,27 @@ foreach p: proto_sources input = join_paths(proto_dir, '@0@/@1@/@2@.xml'.format(proto_stability, proto_name, output_base)) endif - im_wayland_sources += custom_target('@0@ client header'.format(output_base), - input: input, - output: '@0@-client-protocol.h'.format(output_base), - command: [ - genprotocols, - wayland_scanner, - '@INPUT@', '@OUTPUT@', - 'client-header', - ]) - - im_wayland_sources += custom_target('@0@ source'.format(output_base), - input: input, - output: '@0@-protocol.c'.format(output_base), - command: [ - genprotocols, - wayland_scanner, - '@INPUT@', '@OUTPUT@', - 'code', - ]) + if wayland_enabled + im_wayland_sources += custom_target('@0@ client header'.format(output_base), + input: input, + output: '@0@-client-protocol.h'.format(output_base), + command: [ + genprotocols, + wayland_scanner, + '@INPUT@', '@OUTPUT@', + 'client-header', + ]) + + im_wayland_sources += custom_target('@0@ source'.format(output_base), + input: input, + output: '@0@-protocol.c'.format(output_base), + command: [ + genprotocols, + wayland_scanner, + '@INPUT@', '@OUTPUT@', + 'code', + ]) + endif endforeach if os_unix |