diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2017-06-22 20:18:15 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2017-07-20 21:11:56 +0100 |
commit | 8f859a510506318f91f639b67807a3dbdd4d0fbc (patch) | |
tree | 938852c094bbd44a6db8d57b3de56fdfd96f3abe /mesonbuild/build.py | |
parent | 3110c209f76b3389c34ce953ae6814ed64d7a898 (diff) | |
download | meson-8f859a510506318f91f639b67807a3dbdd4d0fbc.zip meson-8f859a510506318f91f639b67807a3dbdd4d0fbc.tar.gz meson-8f859a510506318f91f639b67807a3dbdd4d0fbc.tar.bz2 |
Make the name of the executable implib configurable
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r-- | mesonbuild/build.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index df24c7f..89b96f5 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -1135,14 +1135,17 @@ class Executable(BuildTarget): # The import library that GCC would generate (and prefer) self.gcc_import_filename = None - # if implib:true appears, this target is linkwith:-able, but that only - # means something on Windows platforms. + # if implib appears, this target is linkwith:-able, but that only means + # something on Windows platforms. self.is_linkwithable = False if 'implib' in kwargs and kwargs['implib']: + implib_basename = self.name + '.exe' + if not isinstance(kwargs['implib'], bool): + implib_basename = kwargs['implib'] self.is_linkwithable = True if for_windows(is_cross, environment) or for_cygwin(is_cross, environment): - self.vs_import_filename = '{0}.lib'.format(self.name) - self.gcc_import_filename = 'lib{0}.exe.a'.format(self.name) + self.vs_import_filename = '{0}.lib'.format(implib_basename) + self.gcc_import_filename = 'lib{0}.a'.format(implib_basename) if self.get_using_msvc(): self.import_filename = self.vs_import_filename |