diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2020-09-19 14:07:28 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2020-09-19 14:07:28 +0100 |
commit | 01683a5882ed8e4629158985da5422e26776d1d3 (patch) | |
tree | 1ff502d0289cd006f347a749b7d073a98fd1d020 /meson.build | |
parent | 9a3ad1df1cdca3559d0102918b7527005605df1a (diff) | |
download | cairo-01683a5882ed8e4629158985da5422e26776d1d3.tar.gz |
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
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/meson.build b/meson.build index fddb3a28c..13c5482b6 100644 --- a/meson.build +++ b/meson.build @@ -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() |