diff options
Diffstat (limited to 'Library/Formula/yaml-cpp.rb')
| -rw-r--r-- | Library/Formula/yaml-cpp.rb | 9 |
1 files changed, 8 insertions, 1 deletions
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 |
