Skip to content

Commit

Permalink
use GCC for mojave or older
Browse files Browse the repository at this point in the history
  • Loading branch information
flier authored and glensc committed Apr 25, 2020
1 parent deca05c commit 9f93bcd
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Formula/vcpkg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@ class Vcpkg < Formula

depends_on "cmake" => :build
depends_on "ninja" => :build

depends_on "gcc" if MacOS.version <= :mojave

def install
system "./bootstrap-vcpkg.sh", "-useSystemBinaries", "-allowAppleClang"
if MacOS.version <= :mojave
ENV["CC"] = Formula["gcc"].opt_bin/"gcc-#{Formula["gcc"].version_suffix}"
ENV["CXX"] = Formula["gcc"].opt_bin/"g++-#{Formula["gcc"].version_suffix}"
end
args = %w[-useSystemBinaries]
args += %w[-allowAppleClang] if MacOS.version > :mojave
system "./bootstrap-vcpkg.sh", *args
libexec.install ["ports", "scripts", "triplets", "vcpkg", ".vcpkg-root"]
bin.install_symlink libexec/"vcpkg"
end
Expand Down

0 comments on commit 9f93bcd

Please sign in to comment.