diff options
| author | Patrick Huck | 2014-11-03 14:48:06 -0800 |
|---|---|---|
| committer | Mike McQuaid | 2014-11-04 08:50:11 +0000 |
| commit | c2639cff2de992d50231814f282f1f83d53a9305 (patch) | |
| tree | a87b6bb1c5da99c5e91c0df4be2643721d8e6754 /Library/Formula/yaml-cpp.rb | |
| parent | 3c83a1f1eef1755a18bdf531eb173bb3c4fc1577 (diff) | |
| download | homebrew-c2639cff2de992d50231814f282f1f83d53a9305.tar.bz2 | |
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 <mike@mikemcquaid.com>
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 |
