mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 16:55:38 +08:00
simplify
This commit is contained in:
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user