mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-05 07:45:39 +08:00
Add ext-snappy and snappy support on Windows
This commit is contained in:
@@ -8,6 +8,7 @@ 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('snappy')]
|
||||
class snappy
|
||||
@@ -24,4 +25,15 @@ class snappy
|
||||
)
|
||||
->build('../..');
|
||||
}
|
||||
|
||||
#[BuildFor('Windows')]
|
||||
public function buildWin(LibraryPackage $lib): void
|
||||
{
|
||||
WindowsCMakeExecutor::create($lib)
|
||||
->addConfigureArgs(
|
||||
'-DSNAPPY_BUILD_TESTS=OFF',
|
||||
'-DSNAPPY_BUILD_BENCHMARKS=OFF',
|
||||
)
|
||||
->build();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user