Skip to content

Commit 2a83799

Browse files
author
Hendrik Mennen
committed
Fix libaom build dir collision with source tree's build/cmake/
libaom ships a build/cmake/ directory containing its cmake modules. Using -B build overwrites this, causing include() failures. Renamed the build directory to builddir, matching the Unix builder convention.
1 parent b146e34 commit 2a83799

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/SPC/builder/windows/library/libaom.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@ class libaom extends WindowsLibraryBase
1212

1313
protected function build(): void
1414
{
15-
// reset cmake
16-
FileSystem::resetDir($this->source_dir . '\build');
15+
// libaom source tree contains a build/cmake/ directory with its own
16+
// cmake modules, so we must use a different name for the build dir
17+
// to avoid collisions.
18+
FileSystem::resetDir($this->source_dir . '\builddir');
1719

1820
// start build
1921
cmd()->cd($this->source_dir)
2022
->execWithWrapper(
2123
$this->builder->makeSimpleWrapper('cmake'),
22-
'-S . -B build ' .
24+
'-S . -B builddir ' .
2325
'-A x64 ' .
2426
"-DCMAKE_TOOLCHAIN_FILE={$this->builder->cmake_toolchain_file} " .
2527
'-DCMAKE_BUILD_TYPE=Release ' .
@@ -34,7 +36,7 @@ protected function build(): void
3436
)
3537
->execWithWrapper(
3638
$this->builder->makeSimpleWrapper('cmake'),
37-
"--build build --config Release --target install -j{$this->builder->concurrency}"
39+
"--build builddir --config Release --target install -j{$this->builder->concurrency}"
3840
);
3941
}
4042
}

0 commit comments

Comments
 (0)