Commit a7d2fc51 authored by Niklas Haas's avatar Niklas Haas

meson: link glslang against pthread where needed

See the justification in the comments. Works around build issues on some
platforms. Not the cleanest implementation, but then again, C linking is
not the cleanest topic. (Actually not giving meson the blame here)
parent 365eb1bb
......@@ -110,7 +110,13 @@ if glslang_found
).to_int()
if glslang_ver >= glslang_min_ver
glslang_combined = declare_dependency(dependencies: glslang_deps)
# glslang must be linked against pthreads on platforms where pthreads is
# available. Because of their horrible architecture, gcc can't do it
# automatically, and for some reason dependency('threads') (which uses
# -pthread) doesn't work. We actually need -lpthreads for the glslang
# object files to link, for whatever weird reason.
pthread = cxx.find_library('pthread', required: false)
glslang_combined = declare_dependency(dependencies: glslang_deps + [pthread])
else
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