mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
Add optional lib log
This commit is contained in:
parent
da45aa7f15
commit
474fe63ad3
@ -80,8 +80,10 @@ class UnixAutoconfExecutor extends Executor
|
||||
public function optionalLib(string $name, \Closure|string $true_args, string $false_args = ''): static
|
||||
{
|
||||
if ($get = $this->library->getBuilder()->getLib($name)) {
|
||||
logger()->info("Building library [{$this->library->getName()}] with {$name} support");
|
||||
$args = $true_args instanceof \Closure ? $true_args($get) : $true_args;
|
||||
} else {
|
||||
logger()->info("Building library [{$this->library->getName()}] without {$name} support");
|
||||
$args = $false_args;
|
||||
}
|
||||
$this->addConfigureArgs($args);
|
||||
|
||||
@ -58,8 +58,10 @@ class UnixCMakeExecutor extends Executor
|
||||
public function optionalLib(string $name, \Closure|string $true_args, string $false_args = ''): static
|
||||
{
|
||||
if ($get = $this->library->getBuilder()->getLib($name)) {
|
||||
logger()->info("Building library [{$this->library->getName()}] with {$name} support");
|
||||
$args = $true_args instanceof \Closure ? $true_args($get) : $true_args;
|
||||
} else {
|
||||
logger()->info("Building library [{$this->library->getName()}] without {$name} support");
|
||||
$args = $false_args;
|
||||
}
|
||||
$this->addConfigureArgs($args);
|
||||
@ -193,6 +195,7 @@ SET(CMAKE_INSTALL_PREFIX "{$root}")
|
||||
SET(CMAKE_INSTALL_LIBDIR "lib")
|
||||
|
||||
set(PKG_CONFIG_EXECUTABLE "{$root}/bin/pkg-config")
|
||||
list(APPEND PKG_CONFIG_EXECUTABLE "--static")
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user