mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 16:55:38 +08:00
Add WindowsCMakeExecutor
This commit is contained in:
24
src/Package/Library/onig.php
Normal file
24
src/Package/Library/onig.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Package\Library;
|
||||
|
||||
use StaticPHP\Attribute\Package\BuildFor;
|
||||
use StaticPHP\Attribute\Package\Library;
|
||||
use StaticPHP\Package\LibraryPackage;
|
||||
use StaticPHP\Runtime\Executor\WindowsCMakeExecutor;
|
||||
use StaticPHP\Util\FileSystem;
|
||||
|
||||
#[Library('onig')]
|
||||
class onig
|
||||
{
|
||||
#[BuildFor('Windows')]
|
||||
public function buildWin(LibraryPackage $package): void
|
||||
{
|
||||
WindowsCMakeExecutor::create($package)
|
||||
->addConfigureArgs('-DMSVC_STATIC_RUNTIME=ON')
|
||||
->build();
|
||||
FileSystem::copy("{$package->getLibDir()}\\onig.lib", "{$package->getLibDir()}\\onig_a.lib");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user