Skip building the wayland backend on systems with missing wayland protocol definitions

Fixes #254
This commit is contained in:
Kovid Goyal
2017-12-27 06:22:36 +05:30
parent 1e2f7c705d
commit 4621ff41d9
2 changed files with 8 additions and 1 deletions

View File

@@ -69,6 +69,8 @@ def init_env(env, pkg_config, at_least_version, module='x11'):
def build_wayland_protocols(env, run_tool, emphasis, newer, dest_dir):
for protocol in env.wayland_protocols:
src = os.path.join(env.wayland_packagedir, protocol)
if not os.path.exists(src):
raise SystemExit('The wayland-protocols package on your system is missing the {} protocol definition file'.format(protocol))
for ext in 'hc':
dest = wayland_protocol_file_name(src, ext)
dest = os.path.join(dest_dir, dest)