dependencies/ui.py: Fix Vulkan detection on Windows

We might be using the 32-bit bits of the VulkanSDK on Windows on x64
Windows, so we still need to pass in the compiler items to detect what
architecture we are building for, so that we link to the correct Vulkan
libraries.

We might want to look into this again if Microsoft will allow ARM/ARM64
versions of the Vulkan drivers and SDK, since post-basic OpenGL and
any Vulkan are not supported on Windows-on-ARM.
This commit is contained in:
Chun-wei Fan 2019-11-25 16:41:43 +08:00 committed by Jussi Pakkanen
parent 07a2fe2f00
commit 7677a38e1a
1 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ from .. import mesonlib
from ..mesonlib import (
MesonException, Popen_safe, extract_as_list, version_compare_many
)
from ..environment import detect_cpu
from ..environment import detect_cpu_family
from .base import DependencyException, DependencyMethods
from .base import ExternalDependency, ExternalProgram, NonExistingExternalProgram
@ -609,7 +609,7 @@ class VulkanDependency(ExternalDependency):
lib_name = 'vulkan-1'
lib_dir = 'Lib32'
inc_dir = 'Include'
if detect_cpu({}) == 'x86_64':
if detect_cpu_family(self.env.coredata.compilers.host) == 'x86_64':
lib_dir = 'Lib'
else:
lib_name = 'vulkan'