lavapipe: build "Windows" check should use the host machine, not the platforms option.

`with_platform_windows` depends on the `platforms` option,
and is an inaccurate proxy check for `host_machine.system() == 'windows'`.
The ICD path and shared library name are dependent on the host system,
not whether or not Lavapipe is built with `WIN32` platform support.
In fact Lavapipe can be built with no platforms (`-Dplatforms=`)
if you only need headless (then this check would be incorrect)

fixes: e030ab5163

Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29900>
This commit is contained in:
Aleksi Sapon 2024-06-27 14:04:38 -04:00 committed by Marge Bot
parent 13e7a39f49
commit 94379377c4

View file

@ -18,7 +18,7 @@ libvulkan_lvp = shared_library(
install : true, install : true,
) )
if with_platform_windows if host_machine.system() == 'windows'
icd_lib_path = import('fs').relative_to(get_option('bindir'), with_vulkan_icd_dir) icd_lib_path = import('fs').relative_to(get_option('bindir'), with_vulkan_icd_dir)
icd_file_name = 'vulkan_lvp.dll' icd_file_name = 'vulkan_lvp.dll'
else else
@ -32,7 +32,7 @@ icd_command = [
'--lib-path', join_paths(icd_lib_path, icd_file_name), '--lib-path', join_paths(icd_lib_path, icd_file_name),
'--out', '@OUTPUT@', '--out', '@OUTPUT@',
] ]
if with_platform_windows if host_machine.system() == 'windows'
icd_command += '--use-backslash' icd_command += '--use-backslash'
endif endif