29 lines
652 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace SPC\builder\unix\library;
use SPC\exception\FileSystemException;
use SPC\exception\RuntimeException;
2025-06-09 09:24:31 +08:00
use SPC\util\executor\UnixCMakeExecutor;
trait zstd
{
/**
* @throws RuntimeException
* @throws FileSystemException
*/
protected function build(): void
{
UnixCMakeExecutor::create($this)
->setCMakeBuildDir("{$this->source_dir}/build/cmake/build")
->addConfigureArgs(
'-DZSTD_BUILD_STATIC=ON',
'-DZSTD_BUILD_SHARED=OFF',
)
->build();
$this->patchPkgconfPrefix(['libzstd.pc']);
}
}