Skip to content

Commit a2181a4

Browse files
committed
gflags: update to use modern cmake syntax
Signed-off-by: Rui Chen <[email protected]>
1 parent 067bbf9 commit a2181a4

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

Formula/g/gflags.rb

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,15 @@ class Gflags < Formula
2222
depends_on "cmake" => [:build, :test]
2323

2424
def install
25-
mkdir "buildroot" do
26-
system "cmake", "..", *std_cmake_args, "-DBUILD_SHARED_LIBS=ON", "-DBUILD_STATIC_LIBS=ON",
27-
"-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
28-
system "make", "install"
29-
end
25+
args = %w[
26+
-DBUILD_SHARED_LIBS=ON
27+
-DBUILD_STATIC_LIBS=ON
28+
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
29+
]
30+
31+
system "cmake", "-S", ".", "-B", "_build", *args, *std_cmake_args
32+
system "cmake", "--build", "_build"
33+
system "cmake", "--install", "_build"
3034
end
3135

3236
test do

0 commit comments

Comments
 (0)