From 450b5ae1b7549f3bbd6db8d4996e677917bd5457 Mon Sep 17 00:00:00 2001 From: "N. Engelhardt" Date: Wed, 23 Sep 2026 16:04:42 +0200 Subject: [PATCH] cmake: Fix Homebrew search on macOS --- cmake/UseHomebrew.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/UseHomebrew.cmake b/cmake/UseHomebrew.cmake index 65ad69e79..1a7f85d38 100644 --- a/cmake/UseHomebrew.cmake +++ b/cmake/UseHomebrew.cmake @@ -3,7 +3,7 @@ # use_homebrew([ROOT ]) # # Includes all packages installed in `` (output of brew --prefix if not -# specified) in `CMAKE_FIND_ROOT_PATH`. +# specified) in `CMAKE_PREFIX_PATH`. # function(use_homebrew) cmake_parse_arguments(PARSE_ARGV 0 arg "" "ROOT" "") @@ -29,9 +29,9 @@ function(use_homebrew) file(GLOB package_roots ${arg_ROOT}/*/*) # e.g. `/opt/homebrew/Cellar/bison/3.8.2/` foreach (package_root ${package_roots}) if (IS_DIRECTORY ${package_root}) - list(APPEND CMAKE_FIND_ROOT_PATH ${package_root}) + list(APPEND CMAKE_PREFIX_PATH "${package_root}") endif() endforeach() - return(PROPAGATE CMAKE_FIND_ROOT_PATH) + return(PROPAGATE CMAKE_PREFIX_PATH) endfunction()