mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 06:21:16 +01:00
[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>
This commit is contained in:
1 parent
65d357f808
commit
e8d2bddfab
3 files changed
+17
-11
No files matched your search
@@ -36,6 +36,9 @@ jobs:
|
||||
libgraphite2-dev \
|
||||
libicu-dev \
|
||||
libpng-dev \
|
||||
libglew-dev \
|
||||
libglfw3-dev \
|
||||
libgl-dev \
|
||||
pkg-config \
|
||||
zlib1g-dev \
|
||||
help2man
|
||||
|
||||
@@ -48,6 +48,7 @@ gpu_demo_generated += custom_target('default font',
|
||||
capture: true,
|
||||
command: [ hexify, 'static const char default_font[]', '@INPUT@' ])
|
||||
|
||||
glew_dep = dependency('glew', required: true)
|
||||
glfw_dep = dependency('glfw3', required: true)
|
||||
gl_dep = dependency('gl', required: true)
|
||||
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()
|
||||
+10
-8
@@ -217,12 +217,14 @@ endif
|
||||
if not get_option('gpu').disabled()
|
||||
subdir('gpu')
|
||||
|
||||
hb_gpu_util = executable('hb-gpu',
|
||||
gpu_demo_sources + gpu_demo_generated,
|
||||
cpp_args: cpp_args,
|
||||
include_directories: [incconfig, incsrc],
|
||||
dependencies: [gl_dep, glew_dep, glfw_dep],
|
||||
link_with: [libharfbuzz, libharfbuzz_gpu],
|
||||
install: false,
|
||||
)
|
||||
if have_gpu_demo_deps
|
||||
hb_gpu_util = executable('hb-gpu',
|
||||
gpu_demo_sources + gpu_demo_generated,
|
||||
cpp_args: cpp_args,
|
||||
include_directories: [incconfig, incsrc],
|
||||
dependencies: [gl_dep, glew_dep, glfw_dep],
|
||||
link_with: [libharfbuzz, libharfbuzz_gpu],
|
||||
install: false,
|
||||
)
|
||||
endif
|
||||
endif
|
||||
Reference in new issue
Block a user