From 80b9b125f47ff2cffa9f603fb86e6e237a039881 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 search path is /opt/homebrew instead of /usr/local. --- mesonbuild/dependencies/boost.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py index 32932853c..cccc0c3bd 100644 --- a/mesonbuild/dependencies/boost.py +++ b/mesonbuild/dependencies/boost.py @@ -665,8 +665,9 @@ class BoostDependency(SystemDependency): 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,8 +689,12 @@ class BoostDependency(SystemDependency): tmp: T.List[Path] = [] # Add some default system paths + if m.is_darwin(): + tmp.extend([ + Path('/opt/homebrew/'), # for Apple Silicon MacOS + Path('/usr/local/opt/boost'), # for Intel Silicon MacOS + ]) tmp += [Path('/opt/local')] - tmp += [Path('/usr/local/opt/boost')] tmp += [Path('/usr/local')] tmp += [Path('/usr')]