aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/dependencies/base.py')
-rw-r--r--mesonbuild/dependencies/base.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index b9a6c6f..45ff96b 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -623,12 +623,16 @@ class PkgConfigDependency(ExternalDependency):
# arguments as-is and then adding the libpaths at the end.
else:
args = None
- if args:
+ if args is not None:
libs_found.add(lib)
# Replace -l arg with full path to library if available
- # else, library is provided by the compiler and can't be resolved
- if not args[0].startswith('-l'):
- lib = args[0]
+ # else, library is either to be ignored, or is provided by
+ # the compiler, can't be resolved, and should be used as-is
+ if args:
+ if not args[0].startswith('-l'):
+ lib = args[0]
+ else:
+ continue
else:
# Library wasn't found, maybe we're looking in the wrong
# places or the library will be provided with LDFLAGS or