Support suggested libs not specified by with-suggested-libs

This commit is contained in:
crazywhalecc
2025-11-04 13:51:11 +08:00
parent 6d1c6d7f61
commit 463a98b1bf
2 changed files with 3 additions and 1 deletions

View File

@@ -146,8 +146,10 @@ class SPCConfigUtil
if (!is_array($extension)) {
$extension = [$extension];
}
$libs = array_map(fn ($y) => $y->getName(), array_merge(...array_map(fn ($x) => $x->getLibraryDependencies(true), $extension)));
return $this->config(
extensions: array_map(fn ($x) => $x->getName(), $extension),
libraries: $libs,
include_suggest_ext: $include_suggest_ext ?: $this->builder?->getOption('with-suggested-exts') ?? false,
include_suggest_lib: $include_suggest_lib ?: $this->builder?->getOption('with-suggested-libs') ?? false,
);