-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1007 from JuliaPackaging/tb/spirv_headers
[SPIRV] Create JLL with the SPIRV headers.
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |