Mesa (master): meson: Add support for configuring dri drivers directory.
Dylan Baker
dbaker at kemper.freedesktop.org
Mon Oct 9 20:57:57 UTC 2017
Module: Mesa
Branch: master
Commit: db9788420d4bc7b4a61eab38c0093af94274d00d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=db9788420d4bc7b4a61eab38c0093af94274d00d
Author: Dylan Baker <dylan at pnwbakers.com>
Date: Thu Sep 28 13:59:04 2017 -0700
meson: Add support for configuring dri drivers directory.
v2: - drop with_ from dri_drivers_path variable (Eric A)
v3: - Move HAVE_X11_PLATFORM to the proper patch (Eric A)
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
meson.build | 5 +++++
meson_options.txt | 2 ++
src/glx/meson.build | 2 +-
src/mesa/drivers/dri/meson.build | 2 +-
4 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 86e1cc98f8..716976ccfc 100644
--- a/meson.build
+++ b/meson.build
@@ -42,6 +42,11 @@ with_asm = get_option('asm')
with_appledri = false
with_windowsdri = false
+dri_drivers_path = get_option('dri-drivers-path')
+if dri_drivers_path == ''
+ dri_drivers_path = join_paths(get_option('libdir'), 'dri')
+endif
+
with_gles1 = get_option('gles1')
with_gles2 = get_option('gles2')
with_opengl = get_option('opengl')
diff --git a/meson_options.txt b/meson_options.txt
index 09adce0286..37b511acd2 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -24,6 +24,8 @@ option('dri3', type : 'combo', value : 'auto', choices : ['auto', 'yes', 'no'],
description : 'enable support for dri3')
option('dri-drivers', type : 'string', value : 'i965',
description : 'comma separated list of dri drivers to build.')
+option('dri-drivers-path', type : 'string', value : '',
+ description : 'Location of dri drivers. Default: $libdir/dri.')
option('vulkan-drivers', type : 'string', value : 'intel,amd',
description : 'comma separated list of vulkan drivers to build.')
option('shader-cache', type : 'boolean', value : true,
diff --git a/src/glx/meson.build b/src/glx/meson.build
index 70718df4d3..6853f5b3a1 100644
--- a/src/glx/meson.build
+++ b/src/glx/meson.build
@@ -106,7 +106,7 @@ elif with_windowsdri
#]
endif
-dri_driver_dir = join_paths(get_option('prefix'), get_option('libdir'), 'dri')
+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'
diff --git a/src/mesa/drivers/dri/meson.build b/src/mesa/drivers/dri/meson.build
index fc851e8a6b..9e0e9638aa 100644
--- a/src/mesa/drivers/dri/meson.build
+++ b/src/mesa/drivers/dri/meson.build
@@ -49,7 +49,7 @@ if with_dri
meson.add_install_script(
join_paths(meson.source_root(), 'bin/install_megadrivers.py'),
libmesa_dri_drivers.full_path(),
- join_paths(get_option('libdir'), 'dri'),
+ dri_drivers_path,
dri_link,
)
endif
More information about the mesa-commit
mailing list