Skip to content

Commit

Permalink
cgal: ensure Find* modules look inside HOMEBREW_PREFIX
Browse files Browse the repository at this point in the history
This also helps guarantee that we build an `:all` bottle.
  • Loading branch information
carlocab committed Sep 20, 2024
1 parent 9a4b084 commit bfbde2d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Formula/c/cgal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ def install
system "cmake", "-S", ".", "-B", "build", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"

# Ensure that the various `Find*` modules look in HOMEBREW_PREFIX.
# This also helps guarantee uniform bottles.
inreplace_files = %w[
CGAL_Common.cmake
FindESBTL.cmake
FindGLPK.cmake
FindIPE.cmake
FindLASLIB.cmake
FindMKL.cmake
FindOSQP.cmake
FindOpenMesh.cmake
FindSuiteSparse.cmake
]
inreplace inreplace_files.map { |file| lib/"cmake/CGAL"/file }, "/usr/local", HOMEBREW_PREFIX
end

test do
Expand Down

0 comments on commit bfbde2d

Please sign in to comment.