mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-17 20:34:51 +08:00
* fix curl on windows build needs nghttp2.dll bug * add curl on windows tests * cs fix * fix curl headers * exit powershell properly * reproduce zend_mm_heap corrupted * reproduce zend_mm_heap corrupted * reproduce zend_mm_heap corrupted * add for-libs option for download * add for-libs option for download * add for-libs option for download
38 lines
1.1 KiB
PHP
38 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace SPC\builder\windows\library;
|
|
|
|
use SPC\store\FileSystem;
|
|
|
|
class nghttp2 extends WindowsLibraryBase
|
|
{
|
|
public const NAME = 'nghttp2';
|
|
|
|
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 ' .
|
|
'-DENABLE_SHARED_LIB=OFF ' .
|
|
'-DENABLE_STATIC_LIB=ON ' .
|
|
'-DENABLE_STATIC_CRT=ON ' .
|
|
'-DENABLE_LIB_ONLY=ON ' .
|
|
'-DCMAKE_INSTALL_PREFIX=' . BUILD_ROOT_PATH . ' '
|
|
)
|
|
->execWithWrapper(
|
|
$this->builder->makeSimpleWrapper('cmake'),
|
|
"--build build --config Release --target install -j{$this->builder->concurrency}"
|
|
);
|
|
}
|
|
}
|