summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-09-02 12:59:54 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-09-02 13:00:09 (GMT)
commit4f91d9d2c70958093d89a20e67d4788b2a57f09e (patch)
tree4e18431654b753face50fb76f624795be596183b
parent18d3733b540caea46a9ef3cb0cd243dbba3bb155 (diff)
parent5bfe33f09203448caaf22cea24427692ea295112 (diff)
downloadCMake-4f91d9d2c70958093d89a20e67d4788b2a57f09e.zip
CMake-4f91d9d2c70958093d89a20e67d4788b2a57f09e.tar.gz
CMake-4f91d9d2c70958093d89a20e67d4788b2a57f09e.tar.bz2
Merge topic 'CMakeFindFrameworks-brew-arm64'
5bfe33f092 CMakeFindFrameworks: Fix Brew 'Frameworks' path on Apple Silicon Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !7618
-rw-r--r--Modules/CMakeFindFrameworks.cmake9
1 files changed, 8 insertions, 1 deletions
diff --git a/Modules/CMakeFindFrameworks.cmake b/Modules/CMakeFindFrameworks.cmake
index 8906f48..1aa3929 100644
--- a/Modules/CMakeFindFrameworks.cmake
+++ b/Modules/CMakeFindFrameworks.cmake
@@ -17,12 +17,19 @@ if(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED)
macro(CMAKE_FIND_FRAMEWORKS fwk)
set(${fwk}_FRAMEWORKS)
if(APPLE)
+ # 'Frameworks' directory from Brew (Apple Silicon and Intel)
+ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
+ set(_brew_framework_path /opt/homebrew/Frameworks)
+ else()
+ set(_brew_framework_path /usr/local/Frameworks)
+ endif()
+
file(TO_CMAKE_PATH "$ENV{CMAKE_FRAMEWORK_PATH}" _cmff_CMAKE_FRAMEWORK_PATH)
set(_cmff_search_paths
${CMAKE_FRAMEWORK_PATH}
${_cmff_CMAKE_FRAMEWORK_PATH}
~/Library/Frameworks
- /usr/local/Frameworks
+ ${_brew_framework_path}
/Library/Frameworks
/System/Library/Frameworks
/Network/Library/Frameworks