@@ 14,13 14,17 @@ if get_option('use_scpy')
endif
if get_option('use_dmabuf')
- egl = dependency('egl')
- drm = dependency('libdrm')
- deps += [egl, drm]
- sources += ['src/dmabuf_source.c',
- 'glad/glad.c',
- 'proto/wlr-export-dmabuf-unstable-v1-protocol.c']
- add_project_arguments('-DENABLE_DMABUF', language : 'c')
+ egl = dependency('egl', required : false)
+ drm = dependency('libdrm', required : false)
+ if egl.found() and drm.found()
+ deps += [egl, drm]
+ sources += ['src/dmabuf_source.c',
+ 'glad/glad.c',
+ 'proto/wlr-export-dmabuf-unstable-v1-protocol.c']
+ add_project_arguments('-DENABLE_DMABUF', language : 'c')
+ else
+ warning('dmabuf was disabled due to missing dependencies')
+ endif
endif
shared_library(meson.project_name(), sources, include_directories : inc, dependencies : deps)