diff --git a/mesonbuild/dependencies/pkgconfig.py b/mesonbuild/dependencies/pkgconfig.py index 251c83ef092f..425d001b24ad 100644 --- a/mesonbuild/dependencies/pkgconfig.py +++ b/mesonbuild/dependencies/pkgconfig.py @@ -424,6 +424,9 @@ def check_pkgconfig(self, pkgbin: ExternalProgram) -> T.Optional[str]: if not pkgbin.found(): mlog.log(f'Did not find pkg-config by name {pkgbin.name!r}') return None + if r'Strawberry\perl\bin' in pkgbin.get_path(): + mlog.log('found pkg-config {!r} but it is Strawberry Perl and thus broken. Ignoring...'.format(' '.join(pkgbin.get_command()))) + return None try: p, out = Popen_safe(pkgbin.get_command() + ['--version'])[0:2] if p.returncode != 0: