mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-02 14:25:41 +08:00
Add ext-snappy and snappy support on Windows
This commit is contained in:
@@ -16,3 +16,4 @@ ext-snappy:
|
||||
lang: cpp
|
||||
php-extension:
|
||||
arg-type@unix: '--enable-snappy --with-snappy-includedir=@build_root_path@'
|
||||
arg-type@windows: '--enable-snappy'
|
||||
|
||||
@@ -15,6 +15,13 @@ snappy:
|
||||
- snappy-c.h
|
||||
- snappy-sinksource.h
|
||||
- snappy-stubs-public.h
|
||||
headers@windows:
|
||||
- snappy.h
|
||||
- snappy-c.h
|
||||
- snappy-sinksource.h
|
||||
- snappy-stubs-public.h
|
||||
lang: cpp
|
||||
static-libs@unix:
|
||||
- libsnappy.a
|
||||
static-libs@windows:
|
||||
- snappy.lib
|
||||
|
||||
@@ -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