Files
static-php-cli/src/SPC/builder/macos/library/glfw.php

33 lines
771 B
PHP
Raw Normal View History

2023-08-18 18:17:52 +08:00
<?php
declare(strict_types=1);
namespace SPC\builder\macos\library;
2025-06-09 01:33:06 +08:00
use SPC\builder\unix\executor\UnixCMakeExecutor;
use SPC\exception\FileSystemException;
use SPC\exception\RuntimeException;
2023-08-18 18:17:52 +08:00
class glfw extends MacOSLibraryBase
{
public const NAME = 'glfw';
/**
* @throws FileSystemException
* @throws RuntimeException
*/
protected function build(): void
2023-08-18 18:17:52 +08:00
{
2025-06-09 01:33:06 +08:00
UnixCMakeExecutor::create($this)
->setCMakeBuildDir("{$this->source_dir}/vendor/glfw")
->setReset(false)
->addConfigureArgs(
'-DGLFW_BUILD_EXAMPLES=OFF',
'-DGLFW_BUILD_TESTS=OFF',
)
->build('.');
2023-08-18 18:17:52 +08:00
// patch pkgconf
$this->patchPkgconfPrefix(['glfw3.pc']);
}
}