Files
harfbuzz/util/gpu/meson.build
T
Behdad EsfahbodandClaude Opus 4.6 e8d2bddfab [gpu] Make GL deps optional; add them to Linux CI
The demo requires GLEW, GLFW3, and GL. Make these optional so the
library still builds on headless systems. The demo is skipped when
they're missing.

Install the GL packages in the Linux CI workflow so the demo
builds there.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 19:14:10 -06:00

55 lines
1.4 KiB
Meson

gpu_demo_sources = files(
'demo-atlas.h',
'demo-atlas.cc',
'demo-buffer.h',
'demo-buffer.cc',
'demo-common.h',
'demo-font.h',
'demo-font.cc',
'demo-glstate.h',
'demo-glstate.cc',
'demo-shader.h',
'demo-shader.cc',
'demo-view.h',
'demo-view.cc',
'hb-gpu-demo.cc',
'matrix4x4.h',
'matrix4x4.c',
'trackball.h',
'trackball.c',
)
gpu_demo_shaders = [
[ 'demo-fragment.glsl', 'demo-fragment-glsl.h', 'demo_fragment_glsl' ],
[ 'demo-vertex.glsl', 'demo-vertex-glsl.h', 'demo_vertex_glsl' ],
[ 'default-text.txt', 'default-text.h', 'default_text' ],
]
gpu_stringize = find_program('../../src/stringize')
gpu_demo_generated = []
foreach p: gpu_demo_shaders
glsl = p.get(0)
header = p.get(1)
decl = p.get(2)
gpu_demo_generated += custom_target('@0@ shader'.format(glsl),
input: glsl,
output: header,
capture: true,
command: [ gpu_stringize, 'static const char *' + decl, '@INPUT@' ])
endforeach
hexify = find_program('hexify')
gpu_demo_generated += custom_target('default font',
input: 'default-font.ttf',
output: 'default-font.h',
capture: true,
command: [ hexify, 'static const char default_font[]', '@INPUT@' ])
glew_dep = dependency('glew', required: false)
glfw_dep = dependency('glfw3', required: false)
gl_dep = dependency('gl', required: false)
have_gpu_demo_deps = glew_dep.found() and glfw_dep.found() and gl_dep.found()