Commit 01683a58 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠
Browse files

meson: ensure srcdir doesn't contain autotools build artifacts

.. such as config.h or other generated files such as cairo-features.h,
as those might be accidentally included by the meson build and cause
weird to debug build issues.

Fixes #423
parent 9a3ad1df
......@@ -24,6 +24,18 @@ if cc.get_id() == 'msvc'
language : 'c')
endif
# Make sure source directory hasn't been configured with autotools
if meson.version().version_compare('>= 0.53')
fs = import('fs')
if fs.exists('config.h') or fs.exists('src/cairo-features.h') or fs.exists('src/cairo-supported-features.h')
error('''
The source directory '@0@' appears to contain
autotools configuration artifacts. This can cause difficult to
debug build problems. Please clean it up and then re-run meson.
'''.format(meson.source_root()))
endif
endif
pkgmod = import('pkgconfig')
python3 = import('python').find_installation()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment