Skip to content

Commit

Permalink
Homebrew has moved on Apple Silicon, support both old and new.
Browse files Browse the repository at this point in the history
  • Loading branch information
cgull committed Mar 9, 2024
1 parent cd29315 commit a9b3a82
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tools/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@ libarchive = dependency('libarchive', required: false)
if not libarchive.found()
# homebrew
libarchive_lib = cc.find_library('archive', dirs: ['/usr/local/opt/libarchive/lib'], required: false)
if not libarchive_lib.found()
libarchive_lib = cc.find_library('archive', dirs: ['/opt/homebrew/opt/libarchive/lib'], required: false)
endif
if libarchive_lib.found()
libarchive = declare_dependency(dependencies: [libarchive_lib], include_directories: include_directories(['/usr/local/opt/libarchive/include']))
else
# Apple Silicon Homebrew
libarchive_lib = cc.find_library('archive', dirs: ['/opt/homebrew/opt/libarchive/lib'], required: false)
if libarchive_lib.found()
libarchive = declare_dependency(dependencies: [libarchive_lib], include_directories: include_directories(['/opt/homebrew/opt/libarchive/include']))
endif
endif
endif

Expand Down

0 comments on commit a9b3a82

Please sign in to comment.