homebrew-core/Formula/spirv-headers.rb

32 lines
886 B
Ruby

class SpirvHeaders < Formula
desc "Headers for SPIR-V"
homepage "https://github.com/KhronosGroup/SPIRV-Headers"
url "https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/sdk-1.3.239.0.tar.gz"
sha256 "fdaf6670e311cd1c08ae90bf813e89dd31630205bc60030ffd25fb0af39b51fe"
license "MIT"
livecheck do
url :stable
regex(/^sdk[._-]v?(\d+(?:\.\d+)+)$/i)
end
bottle do
sha256 cellar: :any_skip_relocation, all: "d0df418af58b790aea3353392300fd79e7435f0d6582bc199a6eeed433651f7f"
end
depends_on "cmake" => [:build, :test]
def install
system "cmake", "-S", ".", "-B", "build", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
pkgshare.install "example"
end
test do
system "cmake", "-S", pkgshare/"example", "-B", "build", *std_cmake_args
system "cmake", "--build", "build"
end
end