mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 12:54:52 +08:00
26 lines
644 B
PHP
26 lines
644 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace SPC\builder\unix\library;
|
|
|
|
use SPC\util\executor\UnixCMakeExecutor;
|
|
|
|
trait tidy
|
|
{
|
|
protected function build(): void
|
|
{
|
|
$cmake = UnixCMakeExecutor::create($this)
|
|
->setBuildDir("{$this->source_dir}/build-dir")
|
|
->addConfigureArgs(
|
|
'-DSUPPORT_CONSOLE_APP=OFF',
|
|
'-DBUILD_SHARED_LIB=OFF'
|
|
);
|
|
if (version_compare(get_cmake_version(), '4.0.0', '>=')) {
|
|
$cmake->addConfigureArgs('-DCMAKE_POLICY_VERSION_MINIMUM=3.5');
|
|
}
|
|
$cmake->build();
|
|
$this->patchPkgconfPrefix(['tidy.pc']);
|
|
}
|
|
}
|