WIP: use system libraries for grpc without building our own grpc lib

This commit is contained in:
henderkes
2025-12-27 22:20:02 +01:00
parent 9a681a9fa6
commit 09b89a30f9
3 changed files with 32 additions and 7 deletions

View File

@@ -375,8 +375,17 @@ abstract class LibraryBase
return false;
}
}
$pkg_config_path = getenv('PKG_CONFIG_PATH') ?: '';
$search_paths = array_filter(explode(is_unix() ? ':' : ';', $pkg_config_path));
foreach (Config::getLib(static::NAME, 'pkg-configs', []) as $name) {
if (!file_exists(BUILD_LIB_PATH . "/pkgconfig/{$name}.pc")) {
$found = false;
foreach ($search_paths as $path) {
if (file_exists($path . "/{$name}.pc")) {
$found = true;
break;
}
}
if (!$found) {
return false;
}
}