build: Ignore macOS ARM homebrew path when cross compiling. (#922)
Some checks failed
Linux-Qt / build (push) Waiting to run
Linux / build (push) Waiting to run
macOS-Qt / build (push) Waiting to run
macOS / build (push) Waiting to run
Windows-Qt / build (push) Waiting to run
Windows / build (push) Waiting to run
Reuse / reuse (push) Failing after 0s
Clang Format / clang-format (push) Failing after 0s

This commit is contained in:
squidbus 2024-09-16 03:24:47 -07:00 committed by GitHub
parent da1e4ff5eb
commit ecb5a5fdec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -47,6 +47,11 @@ else()
message(FATAL_ERROR "Unsupported CPU architecture: ${BASE_ARCHITECTURE}") message(FATAL_ERROR "Unsupported CPU architecture: ${BASE_ARCHITECTURE}")
endif() endif()
if (APPLE AND ARCHITECTURE STREQUAL "x86_64")
# Exclude ARM homebrew path to avoid conflicts when cross compiling.
list(APPEND CMAKE_IGNORE_PREFIX_PATH "/opt/homebrew")
endif()
# This function should be passed a list of all files in a target. It will automatically generate file groups # This function should be passed a list of all files in a target. It will automatically generate file groups
# following the directory hierarchy, so that the layout of the files in IDEs matches the one in the filesystem. # following the directory hierarchy, so that the layout of the files in IDEs matches the one in the filesystem.
function(create_target_directory_groups target_name) function(create_target_directory_groups target_name)