summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-12-14 12:09:58 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-12-14 12:10:04 (GMT)
commit41d8c20221673b886facad5ae6bedd6a7be7ccfb (patch)
tree504ed7dcc2ec2b8f0bbd7d73e1b256e797f2ee88 /Modules/Platform
parent627e390ff77b91005515387c56d28eab72f6254b (diff)
parent1a5c1a68b6a3ffdee2a2ae106af6724eb2d4786a (diff)
downloadCMake-41d8c20221673b886facad5ae6bedd6a7be7ccfb.zip
CMake-41d8c20221673b886facad5ae6bedd6a7be7ccfb.tar.gz
CMake-41d8c20221673b886facad5ae6bedd6a7be7ccfb.tar.bz2
Merge topic 'macos-homebrew-apple-silicon'
1a5c1a68b6 macOS: Add /opt/homebrew to CMAKE_SYSTEM_PREFIX_PATH on Apple Silicon Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Fons Rademakers <fons.rademakers@cern.ch> Merge-request: !5602
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/Darwin.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/Platform/Darwin.cmake b/Modules/Platform/Darwin.cmake
index c6de3b0..80595ea 100644
--- a/Modules/Platform/Darwin.cmake
+++ b/Modules/Platform/Darwin.cmake
@@ -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)