mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 08:45:40 +08:00
Add libjpeg,libpng
This commit is contained in:
28
src/Package/Library/libjpeg.php
Normal file
28
src/Package/Library/libjpeg.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Package\Library;
|
||||
|
||||
use StaticPHP\Attribute\Package\BuildFor;
|
||||
use StaticPHP\Attribute\Package\Library;
|
||||
use StaticPHP\Package\LibraryPackage;
|
||||
use StaticPHP\Runtime\Executor\UnixCMakeExecutor;
|
||||
|
||||
#[Library('libjpeg')]
|
||||
class libjpeg
|
||||
{
|
||||
#[BuildFor('Darwin')]
|
||||
#[BuildFor('Linux')]
|
||||
public function buildUnix(LibraryPackage $lib): void
|
||||
{
|
||||
UnixCMakeExecutor::create($lib)
|
||||
->addConfigureArgs(
|
||||
'-DENABLE_STATIC=ON',
|
||||
'-DENABLE_SHARED=OFF',
|
||||
)
|
||||
->build();
|
||||
// patch pkgconfig
|
||||
$lib->patchPkgconfPrefix(['libjpeg.pc', 'libturbojpeg.pc']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user