From 9dafcb1ad840b9a4a3bb814ec53743e8a6d8c324 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Fri, 23 Oct 2026 23:51:25 -0300 Subject: [PATCH] Add flag to build with system spirv headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Multiple downstream distributions patch meson.build to use the system spriv headers instead of the relative path — the latter is absent from tarballs but also already packaged separately. Add a meson option to build using system headers instead of the vendored/submodule ones. --- meson_options.txt | 1 + src/meson.build | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/meson_options.txt b/meson_options.txt index ea535ab40..ed03961eb 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -9,4 +9,5 @@ option('enable_gamescope_wsi_layer', type : 'boolean', value : true, description option('enable_openvr_support', type : 'boolean', value : true, description: 'OpenVR Integrations') option('enable_tests', type : 'boolean', value : true, description: 'Build unit tests') option('enable_zenity', type : 'boolean', value : true, description: 'Build with zenity support in the WSI layers error handling') +option('system_spirv_headers', type : 'boolean', value : false, description: 'Use system SPIR-V headers instead of bundled ones') option('benchmark', type: 'feature', description: 'Benchmark tools') diff --git a/src/meson.build b/src/meson.build index 498bca645..2a928f619 100644 --- a/src/meson.build +++ b/src/meson.build @@ -87,10 +87,15 @@ reshade_src = [ 'reshade/source/effect_symbol_table.cpp', ] +spirv_include_path = '../thirdparty/SPIRV-Headers/include/spirv/unified1' +if get_option('system_spirv_headers') + spirv_include_path = '/usr/include/spirv/unified1' +endif + reshade_include = include_directories([ 'reshade/source', 'reshade/include', - '../thirdparty/SPIRV-Headers/include/spirv/unified1' + spirv_include_path ]) sol2_include = include_directories(['../thirdparty'])