Skip to content

Commit

Permalink
Prefer "-DCMAKE..." over environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jacknagel committed May 10, 2014
1 parent 038e150 commit 1a74f66
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
6 changes: 4 additions & 2 deletions Formula/libbtbb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ class Libbtbb < Formula
depends_on "python"

def install
args = std_cmake_args

if build.universal?
ENV.universal_binary
ENV["CMAKE_OSX_ARCHITECTURES"] = Hardware::CPU.universal_archs.as_cmake_arch_flags
args << "-DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.universal_archs.as_cmake_arch_flags}"
end

mkdir "build" do
system "cmake", "..", *std_cmake_args
system "cmake", "..", *args
system "make", "install"
end
end
Expand Down
7 changes: 5 additions & 2 deletions Formula/libfreenect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ class Libfreenect < Formula
depends_on 'libusb'

def install
args = std_cmake_args

if build.universal?
ENV.universal_binary
ENV['CMAKE_OSX_ARCHITECTURES'] = Hardware::CPU.universal_archs.as_cmake_arch_flags
args << "-DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.universal_archs.as_cmake_arch_flags}"
end

mkdir "build" do
system "cmake", "..", *std_cmake_args
system "cmake", "..", *args
system "make install"
end
end
Expand Down
10 changes: 7 additions & 3 deletions Formula/librtlsdr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ class Librtlsdr < Formula
depends_on "libusb"

def install
args = std_cmake_args

if build.universal?
ENV.universal_binary
ENV["CMAKE_OSX_ARCHITECTURES"] = Hardware::CPU.universal_archs.as_cmake_arch_flags
args << "-DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.universal_archs.as_cmake_arch_flags}"
end

system "cmake", ".", *std_cmake_args
system "make", "install"
mkdir "build" do
system "cmake", "..", *args
system "make install"
end
end
end

0 comments on commit 1a74f66

Please sign in to comment.