meson: Add a GBM backends search path build option
This is the list of locations where GBM will look for alternate backend implementations based on the DRM driver name. It defaults to $libdir/gbm. On Android, this path is currently hard-coded to /vendor/lib[64]/gbm. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9902>
This commit is contained in:
parent
bc343154f8
commit
7f615c66fb
|
@ -118,6 +118,9 @@ LOCAL_CFLAGS += -DHAVE_LIBDRM
|
||||||
LOCAL_SHARED_LIBRARIES += libdrm
|
LOCAL_SHARED_LIBRARIES += libdrm
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
LOCAL_CFLAGS_32 += -DDEFAULT_BACKENDS_PATH=\"/vendor/lib/gbm\"
|
||||||
|
LOCAL_CFLAGS_64 += -DDEFAULT_BACKENDS_PATH=\"/vendor/lib64/gbm\"
|
||||||
|
|
||||||
LOCAL_CFLAGS_32 += -DDEFAULT_DRIVER_DIR=\"/vendor/lib/$(MESA_DRI_MODULE_REL_PATH)\"
|
LOCAL_CFLAGS_32 += -DDEFAULT_DRIVER_DIR=\"/vendor/lib/$(MESA_DRI_MODULE_REL_PATH)\"
|
||||||
LOCAL_CFLAGS_64 += -DDEFAULT_DRIVER_DIR=\"/vendor/lib64/$(MESA_DRI_MODULE_REL_PATH)\"
|
LOCAL_CFLAGS_64 += -DDEFAULT_DRIVER_DIR=\"/vendor/lib64/$(MESA_DRI_MODULE_REL_PATH)\"
|
||||||
LOCAL_PROPRIETARY_MODULE := true
|
LOCAL_PROPRIETARY_MODULE := true
|
||||||
|
|
10
meson.build
10
meson.build
|
@ -92,6 +92,11 @@ if dri_search_path == ''
|
||||||
dri_search_path = dri_drivers_path
|
dri_search_path = dri_drivers_path
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
gbm_backends_path = get_option('gbm-backends-path')
|
||||||
|
if gbm_backends_path == ''
|
||||||
|
gbm_backends_path = join_paths(get_option('prefix'), get_option('libdir'), 'gbm')
|
||||||
|
endif
|
||||||
|
|
||||||
with_gles1 = get_option('gles1')
|
with_gles1 = get_option('gles1')
|
||||||
if with_gles1 == 'true'
|
if with_gles1 == 'true'
|
||||||
with_gles1 = 'enabled'
|
with_gles1 = 'enabled'
|
||||||
|
@ -2162,7 +2167,6 @@ if with_egl
|
||||||
endif
|
endif
|
||||||
lines += 'EGL drivers: ' + ' '.join(egl_drivers)
|
lines += 'EGL drivers: ' + ' '.join(egl_drivers)
|
||||||
endif
|
endif
|
||||||
lines += 'GBM: ' + (with_gbm ? 'yes' : 'no')
|
|
||||||
if with_egl or with_any_vk
|
if with_egl or with_any_vk
|
||||||
_platforms += 'surfaceless'
|
_platforms += 'surfaceless'
|
||||||
if with_gbm and not with_platform_android
|
if with_gbm and not with_platform_android
|
||||||
|
@ -2170,6 +2174,10 @@ if with_egl or with_any_vk
|
||||||
endif
|
endif
|
||||||
lines += 'EGL/Vulkan/VL platforms: ' + ' '.join(_platforms)
|
lines += 'EGL/Vulkan/VL platforms: ' + ' '.join(_platforms)
|
||||||
endif
|
endif
|
||||||
|
lines += 'GBM: ' + (with_gbm ? 'yes' : 'no')
|
||||||
|
if with_gbm
|
||||||
|
lines += 'GBM backends path: ' + gbm_backends_path
|
||||||
|
endif
|
||||||
|
|
||||||
lines += ''
|
lines += ''
|
||||||
if with_any_vk
|
if with_any_vk
|
||||||
|
|
|
@ -270,6 +270,12 @@ option(
|
||||||
choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
|
choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
|
||||||
description : 'Build support for gbm platform'
|
description : 'Build support for gbm platform'
|
||||||
)
|
)
|
||||||
|
option(
|
||||||
|
'gbm-backends-path',
|
||||||
|
type : 'string',
|
||||||
|
value : '',
|
||||||
|
description : 'Locations to search for gbm backends, passed as colon separated list. Default: $libdir/gbm.'
|
||||||
|
)
|
||||||
option(
|
option(
|
||||||
'glx',
|
'glx',
|
||||||
type : 'combo',
|
type : 'combo',
|
||||||
|
|
|
@ -28,7 +28,9 @@ files_gbm = files(
|
||||||
'main/gbmint.h',
|
'main/gbmint.h',
|
||||||
)
|
)
|
||||||
deps_gbm = []
|
deps_gbm = []
|
||||||
args_gbm = []
|
args_gbm = [
|
||||||
|
'-DDEFAULT_BACKENDS_PATH="@0@"'.format(gbm_backends_path),
|
||||||
|
]
|
||||||
deps_gbm = []
|
deps_gbm = []
|
||||||
incs_gbm = [
|
incs_gbm = [
|
||||||
include_directories('main'), inc_include, inc_src, inc_loader,
|
include_directories('main'), inc_include, inc_src, inc_loader,
|
||||||
|
@ -70,6 +72,7 @@ pkg.generate(
|
||||||
version : meson.project_version(),
|
version : meson.project_version(),
|
||||||
libraries : libgbm,
|
libraries : libgbm,
|
||||||
libraries_private : gbm_priv_libs,
|
libraries_private : gbm_priv_libs,
|
||||||
|
variables : ['gbmbackendspath=' + gbm_backends_path],
|
||||||
)
|
)
|
||||||
|
|
||||||
if with_symbols_check
|
if with_symbols_check
|
||||||
|
|
Loading…
Reference in New Issue