mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
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 <git@andred.net> PR-URL: https://github.com/nodejs/node/pull/32046 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
This commit is contained in:
parent
ef95de3492
commit
d3af527152
@ -680,7 +680,11 @@ def pkg_config(pkg):
|
||||
retval = ()
|
||||
for flag in ['--libs-only-l', '--cflags-only-I',
|
||||
'--libs-only-L', '--modversion']:
|
||||
args += [flag, pkg]
|
||||
args += [flag]
|
||||
if isinstance(pkg, list):
|
||||
args += pkg
|
||||
else:
|
||||
args += [pkg]
|
||||
try:
|
||||
proc = subprocess.Popen(shlex.split(pkg_config) + args,
|
||||
stdout=subprocess.PIPE)
|
||||
|
Loading…
Reference in New Issue
Block a user