mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-04 23:35:40 +08:00
Add openssl version getter for Windows, test openssl
This commit is contained in:
@@ -8,6 +8,21 @@ use SPC\exception\RuntimeException;
|
||||
|
||||
class PkgConfigUtil
|
||||
{
|
||||
/**
|
||||
* Returns the version of a module.
|
||||
* This method uses `pkg-config --modversion` to get the version of the specified module.
|
||||
* If the module is not found, it will throw a RuntimeException.
|
||||
*
|
||||
* @param string $pkg_config_str .pc file str, accepts multiple files
|
||||
* @return string version string, e.g. "1.2.3"
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
public static function getModuleVersion(string $pkg_config_str): string
|
||||
{
|
||||
$result = self::execWithResult("pkg-config --modversion {$pkg_config_str}");
|
||||
return trim($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns --cflags-only-other output.
|
||||
* The reason we return the string is we cannot use array_unique() on cflags,
|
||||
|
||||
Reference in New Issue
Block a user