Skip to content

Commit 47e72b2

Browse files
authored
Merge pull request #5549 from yh-sb/vulkansdk-mingw-fix
Fix vulkansdk searching for mingw platform
2 parents 21ae0fa + de96252 commit 47e72b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

xmake/modules/detect/sdks/find_vulkansdk.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@ import("lib.detect.find_package")
3030
function _find_vulkan_from_paths(paths, opt)
3131
opt = opt or {}
3232
local arch = opt.arch or config.arch() or os.arch()
33+
local plat = opt.plat or config.plat() or os.host()
3334
local binsuffix = ((is_host("windows") and arch == "x86") and "bin32" or "bin")
3435
local libname = (is_host("windows") and "vulkan-1" or "vulkan")
3536
local libsuffix = ((is_host("windows") and arch == "x86") and "lib32" or "lib")
3637

3738
-- find library
3839
local result = {links = {}, linkdirs = {}, includedirs = {}}
39-
local linkinfo = find_library(libname, paths, {suffixes = {libsuffix}})
40+
local linkinfo = find_library(libname, paths, {suffixes = {libsuffix}, plat = plat})
4041
if linkinfo then
4142
result.sdkdir = path.directory(linkinfo.linkdir)
4243
result.bindir = path.join(result.sdkdir, binsuffix)

0 commit comments

Comments
 (0)