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.236.0.tar.gz"
sha256 "4d74c685fdd74469eba7c224dd671a0cb27df45fc9aa43cdd90e53bd4f2b2b78"
license "MIT"
livecheck do
url :stable
regex(/^sdk[._-]v?(\d+(?:\.\d+)+)$/i)
end
bottle do
sha256 cellar: :any_skip_relocation, all: "f7fee5531c8440bd2cb450ffb6554406b0626f8992ad18ce926392f5dcc0e697"
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