This commit is contained in:
henderkes 2025-12-01 19:55:51 +01:00
parent 22d263c0a8
commit 5b4f4f8e55

View File

@ -5,17 +5,25 @@ declare(strict_types=1);
namespace SPC\builder\unix\library;
use SPC\util\executor\UnixCMakeExecutor;
use SPC\util\SPCTarget;
trait libwebp
{
protected function build(): void
{
UnixCMakeExecutor::create($this)
->appendEnv([
'CFLAGS' => GNU_ARCH === 'x86_64' ? '-mavx2' : '',
])
->addConfigureArgs(
'-DWEBP_BUILD_EXTRAS=OFF'
'-DWEBP_BUILD_EXTRAS=OFF',
'-DWEBP_BUILD_ANIM_UTILS=OFF',
'-DWEBP_BUILD_CWEBP=OFF',
'-DWEBP_BUILD_DWEBP=OFF',
'-DWEBP_BUILD_GIF2WEBP=OFF',
'-DWEBP_BUILD_IMG2WEBP=OFF',
'-DWEBP_BUILD_VWEBP=OFF',
'-DWEBP_BUILD_WEBPINFO=OFF',
'-DWEBP_BUILD_WEBPMUX=OFF',
'-DWEBP_BUILD_FUZZTEST=OFF',
SPCTarget::getLibcVersion() === '2.31' && GNU_ARCH === 'x86_64' ? '-DWEBP_ENABLE_SIMD=OFF' : '' // fix an edge bug for debian 11 with gcc 10
)
->build();
// patch pkgconfig