mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-02 14:25:41 +08:00
Add zstd
This commit is contained in:
@@ -17,3 +17,5 @@ zstd:
|
||||
- libzstd
|
||||
static-libs@unix:
|
||||
- libzstd.a
|
||||
static-libs@windows:
|
||||
- zstd_static.lib
|
||||
|
||||
@@ -8,10 +8,24 @@ use StaticPHP\Attribute\Package\BuildFor;
|
||||
use StaticPHP\Attribute\Package\Library;
|
||||
use StaticPHP\Package\LibraryPackage;
|
||||
use StaticPHP\Runtime\Executor\UnixCMakeExecutor;
|
||||
use StaticPHP\Runtime\Executor\WindowsCMakeExecutor;
|
||||
|
||||
#[Library('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('Darwin')]
|
||||
public function build(LibraryPackage $lib): void
|
||||
|
||||
Reference in New Issue
Block a user