aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/dependencies/base.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index 3a5f5f8..87518e1 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -869,9 +869,13 @@ class PkgConfigDependency(ExternalDependency):
def _set_libs(self):
env = None
- libcmd = [self.name, '--libs']
+ libcmd = ['--libs']
+
if self.static:
libcmd.append('--static')
+
+ libcmd.append(self.name)
+
# Force pkg-config to output -L fields even if they are system
# paths so we can do manual searching with cc.find_library() later.
env = os.environ.copy()