Add sqlite support for Windows (#350)

* add sqlite support

* cs fix
This commit is contained in:
Jerry Ma
2024-02-23 11:14:51 +08:00
committed by GitHub
parent f498250001
commit 4ab7b6bfdc
5 changed files with 96 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
namespace SPC\builder\windows\library;
class sqlite extends WindowsLibraryBase
{
public const NAME = 'sqlite';
public function patchBeforeBuild(): bool
{
copy(ROOT_DIR . '/src/globals/extra/Makefile-sqlite', $this->source_dir . '/Makefile');
return true;
}
protected function build(): void
{
cmd()->cd($this->source_dir)->execWithWrapper($this->builder->makeSimpleWrapper('nmake'), 'PREFIX=' . BUILD_ROOT_PATH . ' install-static');
}
}