<?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\UnixCMakeExecutor;

#[Library('libde265')]
class libde265 extends LibraryPackage
{
    #[BuildFor('Darwin')]
    #[BuildFor('Linux')]
    public function buildUnix(): void
    {
        UnixCMakeExecutor::create($this)
            ->addConfigureArgs(
                '-DENABLE_SDL=OFF',
                '-DENABLE_DECODER=OFF',
                '-DHAVE_NEON=OFF',
            )
            ->build();
        $this->patchPkgconfPrefix(['libde265.pc']);
    }
}
