jackett 0.22.1382
[Homebrew/homebrew-core.git] / Formula / c / cppzmq.rb
blob9f292aefe4385800614daa22887a81a226ee4f3f
1 class Cppzmq < Formula
2   desc "Header-only C++ binding for libzmq"
3   homepage "https://www.zeromq.org"
4   url "https://github.com/zeromq/cppzmq/archive/refs/tags/v4.10.0.tar.gz"
5   sha256 "c81c81bba8a7644c84932225f018b5088743a22999c6d82a2b5f5cd1e6942b74"
6   license "MIT"
8   bottle do
9     rebuild 1
10     sha256 cellar: :any_skip_relocation, all: "1be9fecbad4da621c4f608f0395efd58f1252f1898ea64620bdaf82a1b6fdc1e"
11   end
13   depends_on "cmake" => :build
14   depends_on "pkgconf" => :build
15   depends_on "zeromq"
17   def install
18     system "cmake", "-S", ".", "-B", "build", "-DCPPZMQ_BUILD_TESTS=OFF", *std_cmake_args
19     system "cmake", "--build", "build"
20     system "cmake", "--install", "build"
22     pkgshare.install "examples"
23   end
25   test do
26     cp pkgshare/"examples/hello_world.cpp", testpath
27     system ENV.cxx, "-std=c++11", "hello_world.cpp", "-I#{include}",
28                     "-L#{Formula["zeromq"].opt_lib}", "-lzmq", "-o", "test"
29     system "./test"
30   end
31 end