aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/python.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/modules/python.py')
-rw-r--r--mesonbuild/modules/python.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
index 049c457..34fe5a5 100644
--- a/mesonbuild/modules/python.py
+++ b/mesonbuild/modules/python.py
@@ -184,10 +184,14 @@ class PythonDependency(ExternalDependency):
if self.platform.startswith('win'):
vernum = self.variables.get('py_version_nodot')
if self.static:
- libname = 'libpython{}.a'.format(vernum)
+ libpath = Path('libs') / 'libpython{}.a'.format(vernum)
else:
- libname = 'python{}.lib'.format(vernum)
- lib = Path(self.variables.get('base')) / 'libs' / libname
+ comp = self.get_compiler()
+ if comp.id == "gcc":
+ libpath = 'python{}.dll'.format(vernum)
+ else:
+ libpath = Path('libs') / 'python{}.lib'.format(vernum)
+ lib = Path(self.variables.get('base')) / libpath
elif self.platform == 'mingw':
if self.static:
libname = self.variables.get('LIBRARY')