class AwsSdkCpp < Formula desc "AWS SDK for C++" homepage "https://github.com/aws/aws-sdk-cpp" url "https://github.com/aws/aws-sdk-cpp/archive/1.0.61.tar.gz" sha256 "ed3ad430cd0272e6fa39596f380b40fffe2a878742eb0bf95cdc3a1b23508732" head "https://github.com/aws/aws-sdk-cpp.git" bottle do cellar :any sha256 "ab2edb25056db01c74d26869cdaad24ff599faf4f86bf5098e8a3737ba7010ca" => :sierra sha256 "36162a5538f64dd172dceec200116f72d2bda997979539ac11fb25d4764bea54" => :el_capitan sha256 "6b98b13b567d6ef04f1b58c04c9b126ffbd58fde5223ecd1abcc7dd18f369eef" => :yosemite end option "with-static", "Build with static linking" option "without-http-client", "Don't include the libcurl HTTP client" depends_on "cmake" => :build def install args = std_cmake_args args << "-DSTATIC_LINKING=1" if build.with? "static" args << "-DNO_HTTP_CLIENT=1" if build.without? "http-client" mkdir "build" do system "cmake", "..", *args system "make" system "make", "install" end lib.install Dir[lib/"mac/Release/*"].select { |f| File.file? f } end test do (testpath/"test.cpp").write <<-EOS.undent #include #include int main() { std::cout << Aws::Version::GetVersionString() << std::endl; return 0; } EOS system ENV.cxx, "test.cpp", "-o", "test", "-laws-cpp-sdk-core" system "./test" end end