if dri_drivers_path == ''
dri_drivers_path = join_paths(get_option('libdir'), 'dri')
endif
+dri_search_path = get_option('dri-search-path')
+if dri_search_path == ''
+ dri_search_path = join_paths(get_option('prefix'), dri_drivers_path)
+endif
with_gles1 = get_option('gles1')
with_gles2 = get_option('gles2')
'dri-drivers-path',
type : 'string',
value : '',
- description : 'Location of dri drivers. Default: $libdir/dri.'
+ description : 'Location to install dri drivers. Default: $libdir/dri.'
+)
+option(
+ 'dri-search-path',
+ type : 'string',
+ value : '',
+ description : 'Locations to search for dri drivers, passed as colon separated list. Default: dri-drivers-path.'
)
option(
'gallium-drivers',
c_args : [
c_vis_args,
c_args_for_egl,
- '-DDEFAULT_DRIVER_DIR="@0@"'.format(dri_driver_dir),
+ '-DDEFAULT_DRIVER_DIR="@0@"'.format(dri_search_path),
'-D_EGL_BUILT_IN_DRIVER_DRI2',
'-D_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_@0@'.format(egl_native_platform.to_upper()),
],
if with_dri2
files_gbm += files('backends/dri/gbm_dri.c', 'backends/dri/gbm_driint.h')
deps_gbm += dep_libdrm # TODO: pthread-stubs
- args_gbm += '-DDEFAULT_DRIVER_DIR="@0@"'.format(dri_driver_dir)
+ args_gbm += '-DDEFAULT_DRIVER_DIR="@0@"'.format(dri_search_path)
endif
if with_platform_wayland
deps_gbm += dep_wayland_server
extra_ld_args_libgl = '-Wl,--disable-stdcall-fixup'
endif
-dri_driver_dir = join_paths(get_option('prefix'), dri_drivers_path)
if not with_glvnd
gl_lib_name = 'GL'
gl_lib_version = '1.2.0'
endif
gl_lib_cargs = [
- '-D_REENTRANT', '-DDEFAULT_DRIVER_DIR="@0@"'.format(dri_driver_dir),
+ '-D_REENTRANT',
+ '-DDEFAULT_DRIVER_DIR="@0@"'.format(dri_search_path),
]
if dep_xxf86vm != [] and dep_xxf86vm.found()