Use Vulkan-Headers module via wrap

This commit replaces the git submodule for the Vulkan headers with meson subproject using wrap.

Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
pull/131/head
Stephan Lachnit 4 years ago committed by jackun
parent fbb4393231
commit 0998d33d72
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

4
.gitignore vendored

@ -36,3 +36,7 @@ lib32-mangohud*.tar.*
*.out
*.app
# subprojects
subprojects/packagecache/
subprojects/imgui-*/
subprojects/Vulkan-Headers-*/

@ -188,15 +188,15 @@ else
endif
if dep_vulkan.found()
vulkan_headers = []
datadir = get_option('datadir')
if not datadir.startswith('/')
datadir = get_option('prefix') / datadir
endif
vk_api_xml = files(datadir / 'vulkan/registry/vk.xml')
else
subdir('modules/Vulkan-Headers')
vulkan_headers = vk_api_xml
vkh_sp = subproject('vulkanheaders')
vk_api_xml = vkh_sp.get_variable('vulkan_api_xml')
dep_vulkan = vkh_sp.get_variable('vulkanheaders_dep')
endif
vk_enum_to_str = custom_target(

@ -1,11 +0,0 @@
#!/bin/sh
GIT="$1"
BUILD_DIR="$2"
if [ ! -f "$BUILD_DIR/registry/vk.xml" ]; then
"$GIT" clone --depth 1 https://github.com/KhronosGroup/Vulkan-Headers.git "$BUILD_DIR"
fi
ln -sf "registry/vk.xml" modules/Vulkan-Headers/
ln -sf "include/vulkan" modules/Vulkan-Headers/

@ -1,12 +0,0 @@
prog_git = find_program('git')
prog_sh = find_program('sh')
script_clone_hdrs = files('clone_headers.sh')
vk_api_xml = custom_target(
'vk_api_xml',
input : [],
output : ['vk.xml'], # because output can't have segments, link vk.xml to this subdir dir in build prefix
command : [
prog_sh, script_clone_hdrs, prog_git, meson.current_build_dir()
],
)

@ -158,7 +158,7 @@ vklayer_mesa_overlay = shared_library(
vklayer_files,
opengl_files,
overlay_spv,
vulkan_headers,
vk_enum_to_str,
c_args : [
pre_args,
c_vis_args,

@ -0,0 +1,10 @@
[wrap-file]
directory = Vulkan-Headers-1.2.136
source_url = https://github.com/KhronosGroup/Vulkan-Headers/archive/v1.2.136.tar.gz
source_filename = vulkanheaders-1.2.136.tar.gz
source_hash = d67e61ade037906d76ae4f1a6d5adf38008b30783774a5957a84527f3a5ebdb4
patch_url = https://github.com/stephanlachnit/vulkanheaders-wrap/releases/download/v1.2.136/v1.2.136.zip
patch_filename = vulkanheaders-1.2.136-wrap.zip
patch_hash = 4b0e8ba1f37458b660f4d3ed3f5259ca5b0bd46ef309cc3ccaf22a2a203bda49
Loading…
Cancel
Save