Don't add the soversion to the dylib filename on OS X

Doing so messes up library search with -lfoo.
See: https://github.com/mesonbuild/meson/pull/680
This commit is contained in:
Nirbheek Chauhan 2016-08-16 15:53:55 +05:30
parent 2549ed8290
commit 5f3097a492
1 changed files with 4 additions and 6 deletions

View File

@ -814,12 +814,10 @@ class SharedLibrary(BuildTarget):
elif for_darwin(is_cross, env):
prefix = 'lib'
suffix = 'dylib'
if self.soversion:
# libfoo.X.dylib
self.filename_tpl = '{0.prefix}{0.name}.{0.soversion}.{0.suffix}'
else:
# libfoo.dylib
self.filename_tpl = '{0.prefix}{0.name}.{0.suffix}'
# libfoo.dylib
self.filename_tpl = '{0.prefix}{0.name}.{0.suffix}'
# On OS X, the filename should never have the soversion
# See: https://github.com/mesonbuild/meson/pull/680
else:
prefix = 'lib'
suffix = 'so'