mirror of
https://git.sr.ht/~calebccff/pbsplash
synced 2026-01-13 04:58:39 -09:00
Make DRM configurable at build time to avoid increasing the size of pbsplash. DRM support is not yet suitable to be enabled by default, but it's nice to have it merged in so the code doesn't bitrot. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
41 lines
872 B
Meson
41 lines
872 B
Meson
project('pbsplash', 'c')
|
|
cc = meson.get_compiler('c')
|
|
|
|
deps = [
|
|
cc.find_library('m', required : false),
|
|
dependency('libudev'),
|
|
]
|
|
|
|
conf_data = configuration_data()
|
|
use_drm = get_option('drm')
|
|
|
|
src = [
|
|
'src/animate.c',
|
|
'src/nanosvg.c',
|
|
'src/timespec.c',
|
|
'src/pbsplash.c',
|
|
'src/fb.c',
|
|
'src/drawing.c',
|
|
]
|
|
|
|
if use_drm.enabled()
|
|
deps += dependency('libdrm')
|
|
src += 'src/drm.c'
|
|
conf_data.set('CONFIG_DRM_SUPPORT', true)
|
|
else
|
|
src += 'src/drm_stub.c'
|
|
conf_data.set('CONFIG_DRM_SUPPORT', false)
|
|
endif
|
|
|
|
configure_file(output : 'config.h',
|
|
configuration : conf_data)
|
|
|
|
inc = [
|
|
include_directories('include'),
|
|
include_directories('.')
|
|
]
|
|
|
|
executable('pbsplash', src,
|
|
include_directories: inc,
|
|
dependencies: deps,
|
|
install: true)
|