Skip to content

Commit

Permalink
ci/win32: add Vulkan-Loader
Browse files Browse the repository at this point in the history
  • Loading branch information
kasper93 committed May 18, 2024
1 parent 84abbf1 commit 0c6a45b
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions ci/build-win32.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,24 @@ spirv_cross_c_dep = declare_dependency(dependencies: [
meson.override_dependency('spirv-cross-c-shared', spirv_cross_c_dep)
"@

# Manually wrap Vulkan-Loader for UPDATE_DEPS option
if (-not (Test-Path "$subprojects/vulkan")) {
New-Item -Path "$subprojects/vulkan" -ItemType Directory | Out-Null
}
Set-Content -Path "$subprojects/vulkan/meson.build" -Value @"
project('vulkan', 'cpp', version: '1.3.285')
cmake = import('cmake')
opts = cmake.subproject_options()
opts.add_cmake_defines({
'UPDATE_DEPS': 'ON',
'USE_GAS': 'ON',
})
opts.append_link_args(['-lcfgmgr32', '-Wl,/def:../subprojects/vulkan-loader/loader/vulkan-1.def'])
vulkan_proj = cmake.subproject('vulkan-loader', options: opts)
vulkan_dep = vulkan_proj.dependency('vulkan')
meson.override_dependency('vulkan', vulkan_dep)
"@

$projects = @(
@{
Path = "$subprojects/ffmpeg.wrap"
Expand Down Expand Up @@ -131,6 +149,12 @@ $projects = @(
URL = "https://github.com/KhronosGroup/SPIRV-Cross"
Revision = "main"
Method = "cmake"
},
@{
Path = "$subprojects/vulkan-loader.wrap"
URL = "https://github.com/KhronosGroup/Vulkan-Loader"
Revision = "main"
Method = "cmake"
}
)

Expand Down Expand Up @@ -180,6 +204,7 @@ meson setup build `
-Dxxhash:cli=false `
-Dluajit:amalgam=true `
-Dd3d11=enabled `
-Dvulkan=enabled `
-Djavascript=enabled `
-Dlua=luajit `
-Ddrm=disabled `
Expand All @@ -188,4 +213,5 @@ meson setup build `
-Dwayland=disabled `
-Dx11=disabled
ninja -C build mpv.exe mpv.com libmpv.a
cp ./subprojects/vulkan-loader/vulkan.dll .
./build/mpv.com -v --no-config

0 comments on commit 0c6a45b

Please sign in to comment.