From 7fb0b0855659111f41be1852b00df11101b9d3a6 Mon Sep 17 00:00:00 2001 From: yh-sb Date: Fri, 30 Aug 2024 23:23:02 +0300 Subject: [PATCH 1/2] Fix vulkansdk searching for mingw platform #5531 --- xmake/modules/detect/sdks/find_vulkansdk.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xmake/modules/detect/sdks/find_vulkansdk.lua b/xmake/modules/detect/sdks/find_vulkansdk.lua index 6ddeddd2787..3f138d96905 100644 --- a/xmake/modules/detect/sdks/find_vulkansdk.lua +++ b/xmake/modules/detect/sdks/find_vulkansdk.lua @@ -30,13 +30,14 @@ import("lib.detect.find_package") function _find_vulkan_from_paths(paths, opt) opt = opt or {} local arch = opt.arch or config.arch() or os.arch() + local plat = opt.plat or config.get("plat") or os.host() local binsuffix = ((is_host("windows") and arch == "x86") and "bin32" or "bin") local libname = (is_host("windows") and "vulkan-1" or "vulkan") local libsuffix = ((is_host("windows") and arch == "x86") and "lib32" or "lib") -- find library local result = {links = {}, linkdirs = {}, includedirs = {}} - local linkinfo = find_library(libname, paths, {suffixes = {libsuffix}}) + local linkinfo = find_library(libname, paths, {suffixes = {libsuffix}, plat = plat}) if linkinfo then result.sdkdir = path.directory(linkinfo.linkdir) result.bindir = path.join(result.sdkdir, binsuffix) From de962524a514adfc2f10c94cfda12eaf758848d0 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 31 Aug 2024 13:39:05 +0800 Subject: [PATCH 2/2] Update find_vulkansdk.lua --- xmake/modules/detect/sdks/find_vulkansdk.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmake/modules/detect/sdks/find_vulkansdk.lua b/xmake/modules/detect/sdks/find_vulkansdk.lua index 3f138d96905..04bc59912f6 100644 --- a/xmake/modules/detect/sdks/find_vulkansdk.lua +++ b/xmake/modules/detect/sdks/find_vulkansdk.lua @@ -30,7 +30,7 @@ import("lib.detect.find_package") function _find_vulkan_from_paths(paths, opt) opt = opt or {} local arch = opt.arch or config.arch() or os.arch() - local plat = opt.plat or config.get("plat") or os.host() + local plat = opt.plat or config.plat() or os.host() local binsuffix = ((is_host("windows") and arch == "x86") and "bin32" or "bin") local libname = (is_host("windows") and "vulkan-1" or "vulkan") local libsuffix = ((is_host("windows") and arch == "x86") and "lib32" or "lib")