diff --git a/src/gallium/targets/lavapipe/lvp_icd.py b/src/gallium/targets/lavapipe/lvp_icd.py index 6084058ca2b..f7d85cb97b8 100644 --- a/src/gallium/targets/lavapipe/lvp_icd.py +++ b/src/gallium/targets/lavapipe/lvp_icd.py @@ -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) diff --git a/src/gallium/targets/lavapipe/meson.build b/src/gallium/targets/lavapipe/meson.build index 3da9ebdb536..6134b393e75 100644 --- a/src/gallium/targets/lavapipe/meson.build +++ b/src/gallium/targets/lavapipe/meson.build @@ -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,