Fix _get_patterns on OpenBSD

We need to account to the possible prefixes (empty or 'lib').
This allows both to work:
cc.find_library('foo')
cc.find_library('libfoo')
pull/5008/head^2
Antoine Jacoutot 6 years ago committed by Nirbheek Chauhan
parent ca355a79fb
commit 03c0c3a8f4
  1. 3
      mesonbuild/compilers/c.py

@ -902,7 +902,8 @@ class CCompiler(Compiler):
# is expensive. It's wrong in many edge cases, but it will match
# correctly-named libraries and hopefully no one on OpenBSD names
# their files libfoo.so.9a.7b.1.0
patterns.append('lib{}.so.[0-9]*.[0-9]*')
for p in prefixes:
patterns.append(p + '{}.so.[0-9]*.[0-9]*')
return patterns
def get_library_naming(self, env, libtype, strict=False):

Loading…
Cancel
Save