From de00a806cb11ec1effdf3c767656f7b1cd3a47d2 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Wed, 24 Apr 2024 10:19:22 -0700 Subject: [PATCH] dependencies/boost: Add new homebrew root On Apple Silicon the default serach path is /opt/homebrew instead of /usr/local. --- mesonbuild/dependencies/boost.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py index 32932853c0c1..470ace0ee152 100644 --- a/mesonbuild/dependencies/boost.py +++ b/mesonbuild/dependencies/boost.py @@ -665,8 +665,9 @@ def detect_roots(self) -> None: inc_paths = [x.resolve() for x in inc_paths] roots += inc_paths + m = self.env.machines[self.for_machine] # Add system paths - if self.env.machines[self.for_machine].is_windows(): + if m.is_windows(): # Where boost built from source actually installs it c_root = Path('C:/Boost') if c_root.is_dir(): @@ -688,6 +689,8 @@ def detect_roots(self) -> None: tmp: T.List[Path] = [] # Add some default system paths + if m.is_darwin(): + tmp.append(Path('/opt/homebrew/opt/boost')) tmp += [Path('/opt/local')] tmp += [Path('/usr/local/opt/boost')] tmp += [Path('/usr/local')]