Skip to content

Commit

Permalink
Merge pull request #191390 from Homebrew/librealsense-drop-workaround
Browse files Browse the repository at this point in the history
librealsense: drop workaround on ARM
  • Loading branch information
BrewTestBot committed Sep 20, 2024
2 parents 32e4207 + d1fe268 commit c5ddbeb
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions Formula/lib/librealsense.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,22 @@ class Librealsense < Formula
depends_on "pkg-config" => :build
depends_on "glfw"
depends_on "libusb"
depends_on "openssl@3"
# Build on Apple Silicon fails when generating Unix Makefiles.
# Ref: https://github.com/IntelRealSense/librealsense/issues/8090
on_arm do
depends_on xcode: :build

on_linux do
depends_on "openssl@3"
end

def install
ENV["OPENSSL_ROOT_DIR"] = Formula["openssl@3"].prefix
ENV["OPENSSL_ROOT_DIR"] = Formula["openssl@3"].prefix if OS.linux?

args = %W[
-DENABLE_CCACHE=OFF
-DBUILD_WITH_OPENMP=OFF
-DCMAKE_CXX_STANDARD=17
-DCMAKE_INSTALL_RPATH=#{rpath}
]
if Hardware::CPU.arm?
args << "-DCMAKE_CONFIGURATION_TYPES=Release"
args << "-GXcode"
end

system "cmake", "-S", ".", "-B", "build", *std_cmake_args, *args
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end
Expand Down

0 comments on commit c5ddbeb

Please sign in to comment.