package An official xmake package repository https://xrepo.xmake.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.2 KiB

package("volk")
set_homepage("https://github.com/zeux/volk")
set_description("volk is a meta-loader for Vulkan")
set_license("MIT")
add_urls("https://github.com/zeux/volk/archive/$(version).tar.gz",
"https://github.com/zeux/volk.git")
add_versions("1.2.162", "ac4d9d6e88dee5a83ad176e2da57f1989ca2c6df155a0aeb5e18e9471aa4d777")
add_deps("vulkan-headers")
add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
if is_plat("linux") then
add_syslinks("dl")
end
on_install("windows", "linux", "macosx", function (package)
io.writefile("xmake.lua", [[
add_rules("mode.debug", "mode.release")
add_requires("vulkan-headers")
target("volk")
set_kind("static")
add_files("volk.c")
add_headerfiles("volk.h")
add_packages("vulkan-headers")
if is_plat("linux") then
add_syslinks("dl")
end
]])
import("package.tools.xmake").install(package)
end)
on_test(function (package)
assert(package:has_cfuncs("volkInitialize", {includes = "volk.h"}))
end)