diff --git a/Formula/j/json-c.rb b/Formula/j/json-c.rb index 7834898dcea841..eadfaee695874f 100644 --- a/Formula/j/json-c.rb +++ b/Formula/j/json-c.rb @@ -27,10 +27,9 @@ class JsonC < Formula depends_on "cmake" => :build def install - mkdir "build" do - system "cmake", "..", *std_cmake_args - system "make", "install" - end + system "cmake", "-S", ".", "-B", "build", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" end test do @@ -46,6 +45,7 @@ def install return 0; } EOS + system ENV.cc, "-I#{include}", "test.c", "-L#{lib}", "-ljson-c", "-o", "test" assert_equal '{ "key": "value" }', shell_output("./test").chomp end