Skip to content

Commit

Permalink
Merge pull request #1007 from JuliaPackaging/tb/spirv_headers
Browse files Browse the repository at this point in the history
[SPIRV] Create JLL with the SPIRV headers.
  • Loading branch information
vchuravy authored May 8, 2020
2 parents a3b16a9 + 565a0cd commit 0e26517
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions S/SPIRV_Headers/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder

name = "SPIRV_Headers"
version = v"1.5.3"

# Collection of sources required to build this package
sources = [
GitSource("https://github.com/KhronosGroup/SPIRV-Headers.git",
"c0df742ec0b8178ad58c68cff3437ad4b6a06e26"),
]

# Bash recipe for building across all platforms
script = raw"""
cd SPIRV-Headers
install_license LICENSE
CMAKE_FLAGS=()
# Install things into $prefix
CMAKE_FLAGS+=(-DCMAKE_INSTALL_PREFIX=${prefix})
cmake -B build -S . -GNinja ${CMAKE_FLAGS[@]}
ninja -C build -j ${nproc} install
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [AnyPlatform()]

# The products that we will ensure are always built
products = [
FileProduct("include/spirv/spir-v.xml", :spirv_xml)
]

# Dependencies that must be installed before this package can be built
dependencies = Dependency[]

build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies)

0 comments on commit 0e26517

Please sign in to comment.