Skip to content

Commit f07d423

Browse files
andredMylesBorins
authored andcommitted
build: allow passing multiple libs to pkg_config
Sometimes it's necessary to pass multiple library names to pkg-config, e.g. the brotli shared libraries can be pulled in with pkg-config libbrotlienc libbrotlidec Update the code to handle both, strings (as used so far), and lists of strings. Signed-off-by: André Draszik <[email protected]> PR-URL: #32046 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Richard Lau <[email protected]>
1 parent 50c5eb4 commit f07d423

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

configure.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,11 @@ def pkg_config(pkg):
680680
retval = ()
681681
for flag in ['--libs-only-l', '--cflags-only-I',
682682
'--libs-only-L', '--modversion']:
683-
args += [flag, pkg]
683+
args += [flag]
684+
if isinstance(pkg, list):
685+
args += pkg
686+
else:
687+
args += [pkg]
684688
try:
685689
proc = subprocess.Popen(shlex.split(pkg_config) + args,
686690
stdout=subprocess.PIPE)

0 commit comments

Comments
 (0)