aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/build.py
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-10-30 22:03:53 +0000
committerJon Turney <jon.turney@dronecode.org.uk>2018-11-06 12:52:02 +0000
commit7a959ffbba6a410a25ec4fef6a6ff039d8c604e2 (patch)
treef09a1c5cdf7bdc4cdcb864cbb9b0a675331f58a5 /mesonbuild/build.py
parenta2a979cf4336e04dd05fe4ca0dcf5fa8425d474f (diff)
downloadmeson-7a959ffbba6a410a25ec4fef6a6ff039d8c604e2.zip
meson-7a959ffbba6a410a25ec4fef6a6ff039d8c604e2.tar.gz
meson-7a959ffbba6a410a25ec4fef6a6ff039d8c604e2.tar.bz2
Fix library implib name when name_prefix: is used
Use the specified name_prefix for implib, rather than hardcoding it. (This is needed to allow an installed library given name_prefix:'' and a name starting with 'lib' to be linked with using -l. (This case is handled specially in the pkgconfig module))
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r--mesonbuild/build.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 8bb49c0..2b6d8e9 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -1562,8 +1562,8 @@ class SharedLibrary(BuildTarget):
# For all other targets/platforms import_filename stays None
elif for_windows(is_cross, env):
suffix = 'dll'
- self.vs_import_filename = '{0}.lib'.format(self.name)
- self.gcc_import_filename = 'lib{0}.dll.a'.format(self.name)
+ self.vs_import_filename = '{0}{1}.lib'.format(self.prefix if self.prefix is not None else '', self.name)
+ self.gcc_import_filename = '{0}{1}.dll.a'.format(self.prefix if self.prefix is not None else 'lib', self.name)
if self.get_using_msvc():
# Shared library is of the form foo.dll
prefix = ''
@@ -1582,7 +1582,7 @@ class SharedLibrary(BuildTarget):
self.filename_tpl = '{0.prefix}{0.name}.{0.suffix}'
elif for_cygwin(is_cross, env):
suffix = 'dll'
- self.gcc_import_filename = 'lib{0}.dll.a'.format(self.name)
+ self.gcc_import_filename = '{0}{1}.dll.a'.format(self.prefix if self.prefix is not None else 'lib', self.name)
# Shared library is of the form cygfoo.dll
# (ld --dll-search-prefix=cyg is the default)
prefix = 'cyg'