diff --git a/meson.build b/meson.build index c5564e9c2c1..fb1dea3ab80 100644 --- a/meson.build +++ b/meson.build @@ -2273,6 +2273,12 @@ devenv = environment() dir_compiler_nir = join_paths(meson.current_source_dir(), 'src/compiler/nir/') dir_source_root = meson.project_source_root() +if host_machine.system() == 'windows' + vulkan_icd_lib_path = import('fs').relative_to(get_option('bindir'), with_vulkan_icd_dir) +else + vulkan_icd_lib_path = get_option('prefix') / get_option('libdir') +endif + subdir('include') subdir('bin') diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build index 9eafb95b926..347622750b1 100644 --- a/src/amd/vulkan/meson.build +++ b/src/amd/vulkan/meson.build @@ -281,17 +281,13 @@ if with_symbols_check ) endif -icd_lib_path = join_paths(get_option('prefix'), get_option('libdir')) icd_file_name = libname_prefix + 'vulkan_radeon.' + libname_suffix -if with_platform_windows - icd_lib_path = import('fs').relative_to(get_option('bindir'), with_vulkan_icd_dir) -endif icd_command = [ prog_python, '@INPUT0@', '--api-version', '1.4', '--xml', '@INPUT1@', '--sizeof-pointer', sizeof_pointer, - '--lib-path', join_paths(icd_lib_path, icd_file_name), + '--lib-path', vulkan_icd_lib_path / icd_file_name, '--out', '@OUTPUT@', ] if with_platform_windows diff --git a/src/asahi/vulkan/meson.build b/src/asahi/vulkan/meson.build index 198ebde602b..820ee2dc2da 100644 --- a/src/asahi/vulkan/meson.build +++ b/src/asahi/vulkan/meson.build @@ -102,11 +102,7 @@ libvulkan_asahi = shared_library( install : true, ) -icd_lib_path = join_paths(get_option('prefix'), get_option('libdir')) icd_file_name = libname_prefix + 'vulkan_asahi.' + libname_suffix -if with_platform_windows - icd_lib_path = import('fs').relative_to(get_option('bindir'), with_vulkan_icd_dir) -endif asahi_icd = custom_target( input : [vk_icd_gen, vk_api_xml], @@ -115,7 +111,7 @@ asahi_icd = custom_target( prog_python, '@INPUT0@', '--api-version', '1.4', '--xml', '@INPUT1@', '--sizeof-pointer', sizeof_pointer, - '--lib-path', join_paths(icd_lib_path, icd_file_name), + '--lib-path', vulkan_icd_lib_path / icd_file_name, '--out', '@OUTPUT@', ], build_by_default : true, diff --git a/src/broadcom/vulkan/meson.build b/src/broadcom/vulkan/meson.build index e01294b83b8..3ad482137df 100644 --- a/src/broadcom/vulkan/meson.build +++ b/src/broadcom/vulkan/meson.build @@ -132,8 +132,7 @@ broadcom_icd = custom_target( prog_python, '@INPUT0@', '--api-version', '1.3', '--xml', '@INPUT1@', '--sizeof-pointer', sizeof_pointer, - '--lib-path', join_paths(get_option('prefix'), get_option('libdir'), - icd_file_name), + '--lib-path', vulkan_icd_lib_path / icd_file_name, '--out', '@OUTPUT@', ], build_by_default : true, diff --git a/src/freedreno/vulkan/meson.build b/src/freedreno/vulkan/meson.build index 8218f8f3687..18e6aba1387 100644 --- a/src/freedreno/vulkan/meson.build +++ b/src/freedreno/vulkan/meson.build @@ -207,8 +207,7 @@ freedreno_icd = custom_target( prog_python, '@INPUT0@', '--api-version', '1.4', '--xml', '@INPUT1@', '--sizeof-pointer', sizeof_pointer, - '--lib-path', join_paths(get_option('prefix'), get_option('libdir'), - icd_file_name), + '--lib-path', vulkan_icd_lib_path / icd_file_name, '--out', '@OUTPUT@', ], build_by_default : true, diff --git a/src/gallium/targets/lavapipe/meson.build b/src/gallium/targets/lavapipe/meson.build index 214b36da04b..b79e3a4ca25 100644 --- a/src/gallium/targets/lavapipe/meson.build +++ b/src/gallium/targets/lavapipe/meson.build @@ -20,17 +20,11 @@ libvulkan_lvp = shared_library( icd_file_name = libname_prefix + 'vulkan_lvp.' + libname_suffix -if host_machine.system() == 'windows' - icd_lib_path = import('fs').relative_to(get_option('bindir'), with_vulkan_icd_dir) -else - icd_lib_path = join_paths(get_option('prefix'), get_option('libdir')) -endif - icd_command = [ prog_python, '@INPUT0@', '--api-version', '1.4', '--xml', '@INPUT1@', '--sizeof-pointer', sizeof_pointer, - '--lib-path', join_paths(icd_lib_path, icd_file_name), + '--lib-path', vulkan_icd_lib_path / icd_file_name, '--out', '@OUTPUT@', ] if host_machine.system() == 'windows' diff --git a/src/gfxstream/guest/vulkan/meson.build b/src/gfxstream/guest/vulkan/meson.build index 46f76928ae0..9429af5b246 100644 --- a/src/gfxstream/guest/vulkan/meson.build +++ b/src/gfxstream/guest/vulkan/meson.build @@ -48,8 +48,7 @@ gfxstream_icd = custom_target( prog_python, '@INPUT0@', '--api-version', '1.1', '--xml', '@INPUT1@', '--sizeof-pointer', sizeof_pointer, - '--lib-path', join_paths(get_option('prefix'), get_option('libdir'), - icd_file_name), + '--lib-path', vulkan_icd_lib_path / icd_file_name, '--out', '@OUTPUT@', ], build_by_default : true, diff --git a/src/imagination/vulkan/meson.build b/src/imagination/vulkan/meson.build index 6cbf84605b5..245cd94f1a2 100644 --- a/src/imagination/vulkan/meson.build +++ b/src/imagination/vulkan/meson.build @@ -146,7 +146,7 @@ powervr_mesa_icd = custom_target( prog_python, '@INPUT0@', '--api-version', '1.4', '--xml', '@INPUT1@', '--sizeof-pointer', sizeof_pointer, - '--lib-path', get_option('prefix') / get_option('libdir') / icd_file_name, + '--lib-path', vulkan_icd_lib_path / icd_file_name, '--out', '@OUTPUT@', ], build_by_default : true, diff --git a/src/intel/vulkan/meson.build b/src/intel/vulkan/meson.build index cf20ae2c81a..e8f61a073c2 100644 --- a/src/intel/vulkan/meson.build +++ b/src/intel/vulkan/meson.build @@ -55,8 +55,7 @@ intel_icd = custom_target( prog_python, '@INPUT0@', '--api-version', '1.4', '--xml', '@INPUT1@', '--sizeof-pointer', sizeof_pointer, - '--lib-path', join_paths(get_option('prefix'), get_option('libdir'), - icd_file_name), + '--lib-path', vulkan_icd_lib_path / icd_file_name, '--out', '@OUTPUT@', ], build_by_default : true, diff --git a/src/intel/vulkan_hasvk/meson.build b/src/intel/vulkan_hasvk/meson.build index 9eb95c5f19b..ed5ac746355 100644 --- a/src/intel/vulkan_hasvk/meson.build +++ b/src/intel/vulkan_hasvk/meson.build @@ -26,8 +26,7 @@ intel_hasvk_icd = custom_target( prog_python, '@INPUT0@', '--api-version', '1.3', '--xml', '@INPUT1@', '--sizeof-pointer', sizeof_pointer, - '--lib-path', join_paths(get_option('prefix'), get_option('libdir'), - icd_file_name), + '--lib-path', vulkan_icd_lib_path / icd_file_name, '--out', '@OUTPUT@', ], build_by_default : true, diff --git a/src/microsoft/vulkan/meson.build b/src/microsoft/vulkan/meson.build index f59ac6f39e8..0349d2ddc4e 100644 --- a/src/microsoft/vulkan/meson.build +++ b/src/microsoft/vulkan/meson.build @@ -74,17 +74,13 @@ libvulkan_dzn = shared_library( ) icd_file_name = libname_prefix + 'vulkan_dzn.' + libname_suffix -icd_lib_path = join_paths(get_option('prefix'), get_option('libdir')) -if with_platform_windows - icd_lib_path = import('fs').relative_to(get_option('bindir'), with_vulkan_icd_dir) -endif icd_command = [ prog_python, '@INPUT0@', '--api-version', '1.1', '--xml', '@INPUT1@', '--sizeof-pointer', sizeof_pointer, - '--lib-path', join_paths(icd_lib_path, icd_file_name), + '--lib-path', vulkan_icd_lib_path / icd_file_name, '--out', '@OUTPUT@', ] diff --git a/src/nouveau/vulkan/meson.build b/src/nouveau/vulkan/meson.build index 40307729f74..bf6e2f7f74e 100644 --- a/src/nouveau/vulkan/meson.build +++ b/src/nouveau/vulkan/meson.build @@ -161,11 +161,7 @@ libvulkan_nouveau = shared_library( install : true, ) -icd_lib_path = join_paths(get_option('prefix'), get_option('libdir')) icd_file_name = libname_prefix + 'vulkan_nouveau.' + libname_suffix -if with_platform_windows - icd_lib_path = import('fs').relative_to(get_option('bindir'), with_vulkan_icd_dir) -endif nouveau_icd = custom_target( 'nouveau_icd', @@ -175,7 +171,7 @@ nouveau_icd = custom_target( prog_python, '@INPUT0@', '--api-version', '1.4', '--xml', '@INPUT1@', '--sizeof-pointer', sizeof_pointer, - '--lib-path', join_paths(icd_lib_path, icd_file_name), + '--lib-path', vulkan_icd_lib_path / icd_file_name, '--out', '@OUTPUT@', ], build_by_default : true, diff --git a/src/panfrost/vulkan/meson.build b/src/panfrost/vulkan/meson.build index 7005885670b..0f224db2464 100644 --- a/src/panfrost/vulkan/meson.build +++ b/src/panfrost/vulkan/meson.build @@ -246,8 +246,7 @@ panfrost_icd = custom_target( prog_python, '@INPUT0@', '--api-version', '1.4', '--xml', '@INPUT1@', '--sizeof-pointer', sizeof_pointer, - '--lib-path', join_paths(get_option('prefix'), get_option('libdir'), - icd_file_name), + '--lib-path', vulkan_icd_lib_path / icd_file_name, '--out', '@OUTPUT@', ], build_by_default : true, diff --git a/src/virtio/vulkan/meson.build b/src/virtio/vulkan/meson.build index 374f0f6be07..e41faf685f3 100644 --- a/src/virtio/vulkan/meson.build +++ b/src/virtio/vulkan/meson.build @@ -25,8 +25,7 @@ virtio_icd = custom_target( prog_python, '@INPUT0@', '--api-version', '1.4', '--xml', '@INPUT1@', '--sizeof-pointer', sizeof_pointer, - '--lib-path', join_paths(get_option('prefix'), get_option('libdir'), - icd_file_name), + '--lib-path', vulkan_icd_lib_path / icd_file_name, '--out', '@OUTPUT@', ], build_by_default : true,