summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/detect/packages/find_mkl.lua3
-rw-r--r--xmake/modules/detect/packages/find_nvtx.lua12
-rw-r--r--xmake/modules/detect/packages/find_vulkansdk.lua6
3 files changed, 4 insertions, 17 deletions
diff --git a/xmake/modules/detect/packages/find_mkl.lua b/xmake/modules/detect/packages/find_mkl.lua
index 05e9f5c92..7de9270c6 100644
--- a/xmake/modules/detect/packages/find_mkl.lua
+++ b/xmake/modules/detect/packages/find_mkl.lua
@@ -46,7 +46,6 @@ function main(opt)
local result = {links = {}, linkdirs = {}, includedirs = {}, threading = ""}
local linkinfo = find_library("mkl_core", paths, {suffixes = path.join("lib", rdir)})
if not linkinfo then
- -- not found?
return
end
table.insert(result.linkdirs, linkinfo.linkdir)
@@ -69,8 +68,6 @@ function main(opt)
-- find include
table.insert(result.includedirs, find_path("mkl.h", paths, {suffixes = "include"}))
-
- -- ok
return result
end
end
diff --git a/xmake/modules/detect/packages/find_nvtx.lua b/xmake/modules/detect/packages/find_nvtx.lua
index 2b6dd26f6..5fce673c3 100644
--- a/xmake/modules/detect/packages/find_nvtx.lua
+++ b/xmake/modules/detect/packages/find_nvtx.lua
@@ -30,7 +30,6 @@ import("detect.sdks.find_cuda")
-- @return see the return value of find_package()
--
function main(opt)
-
if opt.plat == "windows" then
-- init bits
@@ -38,7 +37,8 @@ function main(opt)
local libname = (opt.arch == "x64" and "nvToolsExt64_1" or "nvToolsExt32_1")
-- init search paths
- local paths = {
+ local paths =
+ {
"$(env NVTOOLSEXT_PATH)",
"$(env PROGRAMFILES)/NVIDIA Corporation/NvToolsExt"
}
@@ -59,12 +59,8 @@ function main(opt)
-- find include
table.insert(result.includedirs, find_path("nvToolsExt.h", paths, {suffixes = "include"}))
-
- -- ok
return result
else
-
- -- find cuda
local cuda = find_cuda()
if cuda then
local result = {links = {}, linkdirs = {}, includedirs = {}}
@@ -78,11 +74,7 @@ function main(opt)
return
end
table.join2(result.includedirs, cuda.includedirs)
-
- -- ok
return result
- else
- return
end
end
end
diff --git a/xmake/modules/detect/packages/find_vulkansdk.lua b/xmake/modules/detect/packages/find_vulkansdk.lua
index 6e0a542a0..902fdd498 100644
--- a/xmake/modules/detect/packages/find_vulkansdk.lua
+++ b/xmake/modules/detect/packages/find_vulkansdk.lua
@@ -31,14 +31,14 @@ import("lib.detect.find_library")
function main(opt)
-- init search paths
- local paths = {
+ local paths =
+ {
"$(env VK_SDK_PATH)",
"$(env VULKAN_SDK)"
}
-- find library
local result = {links = {}, linkdirs = {}, includedirs = {}}
-
local libname = (opt.plat == "windows" and "vulkan-1" or "vulkan")
local libsuffix = ((opt.plat == "windows" and opt.arch == "x86") and "lib32" or "lib")
local binsuffix = ((opt.plat == "windows" and opt.arch == "x86") and "bin32" or "bin")
@@ -55,7 +55,5 @@ function main(opt)
-- find include
table.insert(result.includedirs, find_path(path.join("vulkan", "vulkan.h"), paths, {suffixes = "include"}))
-
- -- ok
return result
end