mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
32 lines
726 B
PHP
32 lines
726 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace SPC\builder\unix\library;
|
|
|
|
use SPC\exception\FileSystemException;
|
|
use SPC\exception\RuntimeException;
|
|
use SPC\exception\WrongUsageException;
|
|
use SPC\util\executor\UnixCMakeExecutor;
|
|
|
|
trait libjpeg
|
|
{
|
|
/**
|
|
* @throws FileSystemException
|
|
* @throws RuntimeException
|
|
* @throws WrongUsageException
|
|
*/
|
|
protected function build(): void
|
|
{
|
|
UnixCMakeExecutor::create($this)
|
|
->addConfigureArgs(
|
|
'-DENABLE_STATIC=ON',
|
|
'-DENABLE_SHARED=OFF',
|
|
)
|
|
->build();
|
|
// patch pkgconfig
|
|
$this->patchPkgconfPrefix(['libjpeg.pc', 'libturbojpeg.pc']);
|
|
$this->cleanLaFiles();
|
|
}
|
|
}
|