This commit is contained in:
henderkes
2026-02-20 08:42:30 +07:00
parent 101b4febb9
commit 17acb966de
14 changed files with 18 additions and 23 deletions

View File

@@ -61,7 +61,7 @@ class PkgConfigUtil
*/
public static function getCflags(string $pkg_config_str): string
{
$static = getenv('SPC_STATIC_LIBS') ? '--static' : '';
$static = getenv('SPC_LINK_STATIC') ? '--static' : '';
// get other things
$result = self::execWithResult("pkg-config {$static} --cflags-only-other {$pkg_config_str}");
return trim($result);
@@ -79,7 +79,7 @@ class PkgConfigUtil
public static function getLibsArray(string $pkg_config_str): array
{
// Use this instead of shell() to avoid unnecessary outputs
$static = getenv('SPC_STATIC_LIBS') ? '--static' : '';
$static = getenv('SPC_LINK_STATIC') ? '--static' : '';
$result = self::execWithResult("pkg-config {$static} --libs-only-l {$pkg_config_str}");
$libs = explode(' ', trim($result));