From 69bc124930ae1f63ed5358af9fa63445dc507c3c Mon Sep 17 00:00:00 2001 From: MarkosTh09 Date: Mon, 4 May 2026 11:35:31 +0400 Subject: [PATCH] add `/opt/homebrew` to prefix path instead Append to `CMAKE_PREFIX_PATH` and `CMAKE_SYSTEM_PREFIX` instead of using `include_directories()` and `link_directories()`. This avoids include/link path pollution and reduces clashes with vendored dependencies. This means that conflicting homebrew packages no longer have to be unlinked to build rpcs3, as system paths are searched last. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 217c40f341..cbb2f66fc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,8 +94,8 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) endif() if(APPLE AND CMAKE_OSX_ARCHITECTURES STREQUAL "arm64") - include_directories(/opt/homebrew/include) - link_directories(/opt/homebrew/lib) + list(APPEND CMAKE_PREFIX_PATH "/opt/homebrew") + list(APPEND CMAKE_SYSTEM_PREFIX_PATH "/opt/homebrew") endif() if(MSVC)