aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2024-04-24 10:19:22 -0700
committerEli Schwartz <eschwartz93@gmail.com>2024-04-25 16:07:17 -0400
commit80b9b125f47ff2cffa9f603fb86e6e237a039881 (patch)
tree7897cc1afb0ca3d4a67929396d3d8d8489494e86
parentff95c7d08393a24d60a8b53bb1c2bee76300e822 (diff)
downloadmeson-80b9b125f47ff2cffa9f603fb86e6e237a039881.zip
meson-80b9b125f47ff2cffa9f603fb86e6e237a039881.tar.gz
meson-80b9b125f47ff2cffa9f603fb86e6e237a039881.tar.bz2
dependencies/boost: Add new homebrew root
On Apple Silicon the default search path is /opt/homebrew instead of /usr/local.
-rw-r--r--mesonbuild/dependencies/boost.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py
index 3293285..cccc0c3 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')]