mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-10 10:25:36 +08:00
Add zstd
This commit is contained in:
@@ -17,3 +17,5 @@ zstd:
|
|||||||
- libzstd
|
- libzstd
|
||||||
static-libs@unix:
|
static-libs@unix:
|
||||||
- libzstd.a
|
- libzstd.a
|
||||||
|
static-libs@windows:
|
||||||
|
- zstd_static.lib
|
||||||
|
|||||||
@@ -8,10 +8,24 @@ use StaticPHP\Attribute\Package\BuildFor;
|
|||||||
use StaticPHP\Attribute\Package\Library;
|
use StaticPHP\Attribute\Package\Library;
|
||||||
use StaticPHP\Package\LibraryPackage;
|
use StaticPHP\Package\LibraryPackage;
|
||||||
use StaticPHP\Runtime\Executor\UnixCMakeExecutor;
|
use StaticPHP\Runtime\Executor\UnixCMakeExecutor;
|
||||||
|
use StaticPHP\Runtime\Executor\WindowsCMakeExecutor;
|
||||||
|
|
||||||
#[Library('zstd')]
|
#[Library('zstd')]
|
||||||
class zstd
|
class zstd
|
||||||
{
|
{
|
||||||
|
#[BuildFor('Windows')]
|
||||||
|
public function buildWin(LibraryPackage $package): void
|
||||||
|
{
|
||||||
|
WindowsCMakeExecutor::create($package)
|
||||||
|
->setRootDir("{$package->getSourceDir()}/build/cmake")
|
||||||
|
->setBuildDir("{$package->getSourceDir()}/build/cmake/build")
|
||||||
|
->addConfigureArgs(
|
||||||
|
'-DZSTD_BUILD_STATIC=ON',
|
||||||
|
'-DZSTD_BUILD_SHARED=OFF',
|
||||||
|
)
|
||||||
|
->build();
|
||||||
|
}
|
||||||
|
|
||||||
#[BuildFor('Linux')]
|
#[BuildFor('Linux')]
|
||||||
#[BuildFor('Darwin')]
|
#[BuildFor('Darwin')]
|
||||||
public function build(LibraryPackage $lib): void
|
public function build(LibraryPackage $lib): void
|
||||||
|
|||||||
Reference in New Issue
Block a user