Commit 1a5c1a68 authored by Brad King's avatar Brad King
Browse files

macOS: Add /opt/homebrew to CMAKE_SYSTEM_PREFIX_PATH on Apple Silicon

According to https://brew.sh/2020/12/01/homebrew-2.6.0/ the `/opt/homebrew`
directory is recommended for installing ARM architecture brew packages.

Fixes: #21585
parent 23df57a3
Pipeline #204555 waiting for manual action with stages
in 17 minutes and 7 seconds
......@@ -216,6 +216,13 @@ set(CMAKE_SYSTEM_APPBUNDLE_PATH
unset(_apps_paths)
include(Platform/UnixPaths)
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
list(PREPEND CMAKE_SYSTEM_PREFIX_PATH
/opt/homebrew # Brew on Apple Silicon
)
endif()
if(_CMAKE_OSX_SYSROOT_PATH)
if(EXISTS ${_CMAKE_OSX_SYSROOT_PATH}/usr/include)
list(INSERT CMAKE_SYSTEM_PREFIX_PATH 0 ${_CMAKE_OSX_SYSROOT_PATH}/usr)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment