From 811b177cf897f208c3c44b912aa06bfb21a2694b Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Tue, 7 Apr 2020 16:45:03 +0100 Subject: [PATCH] formula: make CMake SDK root choice consistent with superenv --- Library/Homebrew/formula.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 705c868bca..80d6c5705e 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -1352,8 +1352,7 @@ class Formula args << "-DHAVE_CLOCK_GETTIME:INTERNAL=0" if MacOS.version == "10.11" && MacOS::Xcode.version >= "8.0" # Ensure CMake is using the same SDK we are using. - sdk = MacOS.sdk_path_if_needed - args << "-DCMAKE_OSX_SYSROOT=#{sdk}" if sdk + args << "-DCMAKE_OSX_SYSROOT=#{MacOS.sdk_for_formula(self).path}" if MacOS.sdk_root_needed? args end