From c2639cff2de992d50231814f282f1f83d53a9305 Mon Sep 17 00:00:00 2001 From: Patrick Huck Date: Mon, 3 Nov 2014 14:48:06 -0800 Subject: yaml-cpp: shared library build yaml-cpp: add --with-shared-lib option yaml-cpp: make dylib default, --with-static-lib, avoid multiple splats Closes #33886. Signed-off-by: Mike McQuaid --- Library/Formula/yaml-cpp.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Library/Formula/yaml-cpp.rb') diff --git a/Library/Formula/yaml-cpp.rb b/Library/Formula/yaml-cpp.rb index 8fcb78f7a..cd15ca7e7 100644 --- a/Library/Formula/yaml-cpp.rb +++ b/Library/Formula/yaml-cpp.rb @@ -7,6 +7,7 @@ class YamlCpp < Formula option :cxx11 option :universal + option "with-static-lib", "Build a static library" depends_on 'cmake' => :build @@ -19,8 +20,14 @@ class YamlCpp < Formula def install ENV.cxx11 if build.cxx11? ENV.universal_binary if build.universal? + args = std_cmake_args + if build.with? "static-lib" + args << "-DBUILD_SHARED_LIBS=OFF" + else + args << "-DBUILD_SHARED_LIBS=ON" + end - system "cmake", ".", *std_cmake_args + system "cmake", ".", *args system "make install" end end -- cgit v1.2.3