lavapipe: configure suffix in icd json
Acked-by: Jose Fonseca <jfonsec@vmware.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7341>
This commit is contained in:
@@ -28,10 +28,11 @@ import argparse
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--out', help='Output json file.', required=True)
|
||||
parser.add_argument('--lib-path', help='Path to libvulkan_lvp.so')
|
||||
parser.add_argument('--lib-path', help='Path to libvulkan_lvp.*')
|
||||
parser.add_argument('--suffix', help='Extension of libvulkan_lvp.*')
|
||||
args = parser.parse_args()
|
||||
|
||||
path = 'libvulkan_lvp.so'
|
||||
path = 'libvulkan_lvp.' + args.suffix
|
||||
if args.lib_path:
|
||||
path = os.path.join(args.lib_path, path)
|
||||
|
||||
|
@@ -8,17 +8,23 @@ libvulkan_lvp = shared_library(
|
||||
link_args : [ld_args_bsymbolic, ld_args_gc_sections],
|
||||
dependencies : driver_swrast,
|
||||
install : true,
|
||||
name_suffix : 'so',
|
||||
)
|
||||
|
||||
if with_platform_windows
|
||||
module_dir = join_paths(get_option('prefix'), get_option('bindir'))
|
||||
else
|
||||
module_dir = join_paths(get_option('prefix'), get_option('libdir'))
|
||||
endif
|
||||
|
||||
lvp_icd = custom_target(
|
||||
'lvp_icd',
|
||||
input : 'lvp_icd.py',
|
||||
output : 'lvp_icd.@0@.json'.format(host_machine.cpu()),
|
||||
command : [
|
||||
prog_python, '@INPUT@',
|
||||
'--lib-path', join_paths(get_option('prefix'), get_option('libdir')),
|
||||
'--lib-path', module_dir,
|
||||
'--out', '@OUTPUT@',
|
||||
'--suffix', libvulkan_lvp.full_path().split('.')[-1],
|
||||
],
|
||||
depend_files : files('../../frontends/lavapipe/lvp_extensions.py'),
|
||||
build_by_default : true,
|
||||
|
Reference in New Issue
Block a user