From 026558a1aa6ffec4ad672eee1d7962d7ffb022dd Mon Sep 17 00:00:00 2001 From: Hendrik Mennen Date: Sat, 21 Mar 2026 23:52:46 +0100 Subject: [PATCH] Add Windows builder for libaom library libaom was listed in lib.json and used as a dependency of libavif, but had no Windows library builder, causing all Windows builds to fail with: "library [libaom] is in the lib.json list but not supported to compile" This adds the missing Windows CMake builder following the same pattern as other Windows library builders (libavif, libwebp, freetype). The builder disables docs, examples, tests, and tools for a minimal static build and uses AOM_TARGET_CPU=generic for portability, matching the Unix builder. Also adds the static-libs-windows entry to lib.json so the build system can locate the produced aom.lib artifact. --- config/lib.json | 3 ++ src/SPC/builder/windows/library/libaom.php | 40 ++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 src/SPC/builder/windows/library/libaom.php diff --git a/config/lib.json b/config/lib.json index 58cbd4ba0..2612f6be3 100644 --- a/config/lib.json +++ b/config/lib.json @@ -355,6 +355,9 @@ "static-libs-unix": [ "libaom.a" ], + "static-libs-windows": [ + "aom.lib" + ], "cpp-library": true }, "libargon2": { diff --git a/src/SPC/builder/windows/library/libaom.php b/src/SPC/builder/windows/library/libaom.php new file mode 100644 index 000000000..fd1d8c876 --- /dev/null +++ b/src/SPC/builder/windows/library/libaom.php @@ -0,0 +1,40 @@ +source_dir . '\build'); + + // start build + cmd()->cd($this->source_dir) + ->execWithWrapper( + $this->builder->makeSimpleWrapper('cmake'), + '-B build ' . + '-A x64 ' . + "-DCMAKE_TOOLCHAIN_FILE={$this->builder->cmake_toolchain_file} " . + '-DCMAKE_BUILD_TYPE=Release ' . + '-DBUILD_SHARED_LIBS=OFF ' . + '-DAOM_TARGET_CPU=generic ' . + '-DENABLE_DOCS=OFF ' . + '-DENABLE_EXAMPLES=OFF ' . + '-DENABLE_TESTDATA=OFF ' . + '-DENABLE_TESTS=OFF ' . + '-DENABLE_TOOLS=OFF ' . + '-DCMAKE_INSTALL_PREFIX=' . BUILD_ROOT_PATH . ' ' + ) + ->execWithWrapper( + $this->builder->makeSimpleWrapper('cmake'), + "--build build --config Release --target install -j{$this->builder->concurrency}" + ); + } +}