Skip to content

Commit

Permalink
dependencies/boost: Add new homebrew root
Browse files Browse the repository at this point in the history
On Apple Silicon the default search path is /opt/homebrew instead of
/usr/local.
  • Loading branch information
dcbaker authored and eli-schwartz committed Apr 25, 2024
1 parent ff95c7d commit 80b9b12
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions mesonbuild/dependencies/boost.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand All @@ -688,8 +689,12 @@ def detect_roots(self) -> None:
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')]

Expand Down

0 comments on commit 80b9b12

Please sign in to comment.