Update TBB fetch.lua (#4317)

* Update fetch.lua

replace \\ with / for Linux path compatibility

* Update fetch.lua

* change outdated "intel64" flag to "x86_64"

* Update fetch.lua

---------

Co-authored-by: ruki <waruqi@gmail.com>
pull/4329/head
Altina Orion 6 months ago committed by GitHub
parent 141469c2ae
commit 51347e95cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 12
      packages/t/tbb/fetch.lua

@ -1,11 +1,11 @@
import("lib.detect.find_path")
import("lib.detect.find_library")
function _find_package_on_windows(package, opt)
local rdir = (package:is_arch("x64") and "intel64" or "ia32")
function _find_package(package, opt)
local rdir = (package:is_arch("x64", "x86_64") and "intel64" or "ia32")
local paths = {
"$(env TBB_ROOT)",
"$(env ONEAPI_ROOT)\\tbb\\latest"
"$(env ONEAPI_ROOT)/tbb/latest"
}
-- find includes and links
@ -22,7 +22,6 @@ function _find_package_on_windows(package, opt)
if incpath then
table.insert(result.includedirs, incpath)
end
if #result.includedirs > 0 and #result.linkdirs > 0 then
local version_file = path.join(incpath, "oneapi", "tbb", "version.h")
if not os.isfile(version_file) then
@ -47,9 +46,8 @@ end
function main(package, opt)
if opt.system and package.find_package then
local result
if package:is_plat("windows") then
result = _find_package_on_windows(package, opt)
end
result = _find_package(package, opt)
if not result then
result = package:find_package("tbb", opt)
end

Loading…
Cancel
Save