improve opencv again (#455)

pull/457/head
Hoildkv 4 years ago committed by GitHub
parent 7e26ab1473
commit 3d0bba98c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      packages/o/opencv/xmake.lua

@ -55,6 +55,7 @@ package("opencv")
end
add_configs("blas", {description = "Set BLAS vendor.", default = nil, type = "string", values = {"mkl", "openblas"}})
add_configs("cuda", {description = "Enable CUDA support.", default = false, type = "boolean"})
add_configs("dynamic_parallel", {description = "Dynamically load parallel runtime (TBB etc.).", default = false, type = "boolean"})
if is_plat("macosx") then
add_frameworks("Foundation", "CoreFoundation", "CoreGraphics", "AppKit", "OpenCL")
@ -109,6 +110,8 @@ package("opencv")
if package:config("cuda") then
table.insert(configs, "-DWITH_CUDA=ON")
end
table.insert(configs, "-DPARALLEL_ENABLE_PLUGINS=" .. (package:config("dynamic_parallel") and "ON" or "OFF"))
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
if package:is_plat("windows") then
table.insert(configs, "-DBUILD_WITH_STATIC_CRT=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF"))

Loading…
Cancel
Save