Commit d3a25695 authored by Niklas Haas's avatar Niklas Haas

meson: work around yet more glslang braindeath

Simple work-around to
is to simply brute force `/usr/include/glslang` into our include path,
that way the SPIRV includes will continue working as-is.

(We also add a separate line to help with use cases like e.g. VLC where
the location of the glslang headers are relative to the build prefix)

We do it hackily by directly accessing the compiler flags because these
directories may not necessarily exist, and meson doesn't like using
`include_directories` with nonexistant paths.
parent f2178b8d
Pipeline #12124 failed with stages
in 47 seconds
project('libplacebo', ['c', 'cpp'],
license: 'LGPL2.1+',
default_options: ['c_std=c99'],
meson_version: '>=0.47',
meson_version: '>=0.49',
version: '1.29.0',
......@@ -92,6 +92,18 @@ if glslang_found
pthread = cxx.find_library('pthread', required: false)
glslang_all_deps = glslang_deps + glslang_opt_deps + [pthread]
glslang_combined = declare_dependency(dependencies: glslang_all_deps)
# Work around a glslang include path bug w.r.t stuff previously namespaced
# under /usr/include/SPIRV now being moved to /usr/include/glslang/SPIRV.
extra_glslang_inc = [
get_option('prefix') / get_option('includedir') / 'glslang',
foreach i : extra_glslang_inc
add_project_arguments('-I' + i, language: 'cpp')
error('glslang revision @0@ too old! Must be at least @1@'
.format(glslang_ver, glslang_min_ver))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment