mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 08:45:40 +08:00
Add full gd support on Windows (#484)
* Add full gd support (libjpeg, libpng, libwebp, libavif, freetype), and related patches * cs fix * Fix PHP 8.0 gd build
This commit is contained in:
45
src/SPC/builder/windows/library/libwebp.php
Normal file
45
src/SPC/builder/windows/library/libwebp.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace SPC\builder\windows\library;
|
||||
|
||||
use SPC\store\FileSystem;
|
||||
|
||||
class libwebp extends WindowsLibraryBase
|
||||
{
|
||||
public const NAME = 'libwebp';
|
||||
|
||||
protected function build(): void
|
||||
{
|
||||
// reset cmake
|
||||
FileSystem::resetDir($this->source_dir . '\build');
|
||||
|
||||
// start build
|
||||
cmd()->cd($this->source_dir)
|
||||
->execWithWrapper(
|
||||
$this->builder->makeSimpleWrapper('cmake'),
|
||||
'-B build ' .
|
||||
'-A x64 ' .
|
||||
"-DCMAKE_TOOLCHAIN_FILE={$this->builder->cmake_toolchain_file} " .
|
||||
'-DCMAKE_BUILD_TYPE=Release ' .
|
||||
'-DBUILD_SHARED_LIBS=OFF ' .
|
||||
'-DWEBP_LINK_STATIC=ON ' .
|
||||
'-DWEBP_BUILD_ANIM_UTILS=OFF ' .
|
||||
'-DWEBP_BUILD_CWEBP=OFF ' .
|
||||
'-DWEBP_BUILD_DWEBP=OFF ' .
|
||||
'-DWEBP_BUILD_GIF2WEBP=OFF ' .
|
||||
'-DWEBP_BUILD_IMG2WEBP=OFF ' .
|
||||
'-DWEBP_BUILD_VWEBP=OFF ' .
|
||||
'-DWEBP_BUILD_WEBPINFO=OFF ' .
|
||||
'-DWEBP_BUILD_LIBWEBPMUX=OFF ' .
|
||||
'-DWEBP_BUILD_WEBPMUX=OFF ' .
|
||||
'-DWEBP_BUILD_EXTRAS=OFF ' .
|
||||
'-DCMAKE_INSTALL_PREFIX=' . BUILD_ROOT_PATH . ' '
|
||||
)
|
||||
->execWithWrapper(
|
||||
$this->builder->makeSimpleWrapper('cmake'),
|
||||
"--build build --config Release --target install -j{$this->builder->concurrency}"
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user