mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-08 17:35:36 +08:00
Add ext-snappy and snappy support on Windows
This commit is contained in:
@@ -16,3 +16,4 @@ ext-snappy:
|
|||||||
lang: cpp
|
lang: cpp
|
||||||
php-extension:
|
php-extension:
|
||||||
arg-type@unix: '--enable-snappy --with-snappy-includedir=@build_root_path@'
|
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-c.h
|
||||||
- snappy-sinksource.h
|
- snappy-sinksource.h
|
||||||
- snappy-stubs-public.h
|
- snappy-stubs-public.h
|
||||||
|
headers@windows:
|
||||||
|
- snappy.h
|
||||||
|
- snappy-c.h
|
||||||
|
- snappy-sinksource.h
|
||||||
|
- snappy-stubs-public.h
|
||||||
lang: cpp
|
lang: cpp
|
||||||
static-libs@unix:
|
static-libs@unix:
|
||||||
- libsnappy.a
|
- libsnappy.a
|
||||||
|
static-libs@windows:
|
||||||
|
- snappy.lib
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ 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('snappy')]
|
#[Library('snappy')]
|
||||||
class snappy
|
class snappy
|
||||||
@@ -24,4 +25,15 @@ class snappy
|
|||||||
)
|
)
|
||||||
->build('../..');
|
->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