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>
diff --git a/src/gallium/targets/lavapipe/lvp_icd.py b/src/gallium/targets/lavapipe/lvp_icd.py
index 6084058..f7d85cb 100644
--- a/src/gallium/targets/lavapipe/lvp_icd.py
+++ b/src/gallium/targets/lavapipe/lvp_icd.py
@@ -28,10 +28,11 @@
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)
diff --git a/src/gallium/targets/lavapipe/meson.build b/src/gallium/targets/lavapipe/meson.build
index 3da9ebd..6134b39 100644
--- a/src/gallium/targets/lavapipe/meson.build
+++ b/src/gallium/targets/lavapipe/meson.build
@@ -8,17 +8,23 @@
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,