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